bennett
bennett
FFilament
Created by yassensayed. on 4/28/2024 in #❓┊help
How to return the Wizard to step 1 after create success in custom page.
I was able to accomplish this by placing a listener in Filament rendered HTML: new HtmlString('<div x-on:reset-step.window="step = \'vendors\'"></div>') Obviously you could do this within a label, placeholder, etc. Just note that step is the Alpine variable representing the current step. Lastly you just dispatch reset-step from your Livewire component.
5 replies
FFilament
Created by yassensayed. on 4/28/2024 in #❓┊help
How to return the Wizard to step 1 after create success in custom page.
I'm also having trouble with this. There doesn't seem to be an event listener you can hook into, and nothing sticks out to me in Wizard.php as an easy way to do this. Calling $this->reset() in my component doesn't make the Wizard step reset to 1.
5 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
Switching to visible() and hidden() did solve my issue
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
ok - Is this a bad practice for conditionally rendering fields?
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
The issue seems to be with the way I'm conditionally assigning the Wizard\Step schema:
Wizard\Step::make('Manufacturers')
->description('Select Manufacturers')
->schema(function(Get $get){

return $get('selected_vendors') == null ?

[
Placeholder::make('info')
->label('')
->columnSpanFull()
->content(new HtmlString('<div class="info-notice py-1.5"> some text </div>'))
] :
[
ToggleButtons::make('filter_manufacturers')
->label("Filter selected Vendors by Manufacturer?")
->live()
->inline()
->options([
'yes' => 'Yes',
'no' => 'No',
])
->colors([
'yes' => 'info',
'no' => 'warning',
]),
CheckboxList::make('selected_manufacturers')
->label('Manufacturers')
->hint('Optional')
->options([
'fish' => 'Fish',
'cow' => 'Cow',
'horse' => 'Horse',
'chicken' => 'Chicken',
'pig' => 'Pig',
])
->columns(3)
];
}),
Wizard\Step::make('Manufacturers')
->description('Select Manufacturers')
->schema(function(Get $get){

return $get('selected_vendors') == null ?

[
Placeholder::make('info')
->label('')
->columnSpanFull()
->content(new HtmlString('<div class="info-notice py-1.5"> some text </div>'))
] :
[
ToggleButtons::make('filter_manufacturers')
->label("Filter selected Vendors by Manufacturer?")
->live()
->inline()
->options([
'yes' => 'Yes',
'no' => 'No',
])
->colors([
'yes' => 'info',
'no' => 'warning',
]),
CheckboxList::make('selected_manufacturers')
->label('Manufacturers')
->hint('Optional')
->options([
'fish' => 'Fish',
'cow' => 'Cow',
'horse' => 'Horse',
'chicken' => 'Chicken',
'pig' => 'Pig',
])
->columns(3)
];
}),
If I take out the conditional, and just return a CheckboxList, it works fine
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
I use $this->form->fill() to set some default values :
public function mount(): void
{
$this->form->fill(['filter_manufacturers' => 'no']);
}
public function mount(): void
{
$this->form->fill(['filter_manufacturers' => 'no']);
}
->statePath('data') ( Just the default variable choice )
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
No description
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
No description
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
I've placed a CheckboxList in a Wizard form thats in a custom Livewire Component.
CheckboxList::make('selected_manufacturers')
->label('Manufacturers')
->hint('Optional')
->options([
'fish' => 'Fish',
'cow' => 'Cow',
'horse' => 'Horse',
'chicken' => 'Chicken',
'pig' => 'Pig',
])
->columns(3)
CheckboxList::make('selected_manufacturers')
->label('Manufacturers')
->hint('Optional')
->options([
'fish' => 'Fish',
'cow' => 'Cow',
'horse' => 'Horse',
'chicken' => 'Chicken',
'pig' => 'Pig',
])
->columns(3)
17 replies
FFilament
Created by HeartlandTechie on 12/12/2023 in #❓┊help
CheckBox List - All going on?
Also having this issue
17 replies
FFilament
Created by Zen on 1/19/2024 in #❓┊help
Action::make('update_transaction)->form([])->disabledForm() does not disable the submit button
Also wondering how this can be achieved..
4 replies
FFilament
Created by bennett on 1/30/2024 in #❓┊help
Grouped Actions don't engage modal.
This was a function name issue with the action name. Missed this part: "Add a method that returns your action. The method must share the exact same name as the action, or the name followed by Action."
4 replies
FFilament
Created by LiruLiruLiru on 12/20/2023 in #❓┊help
filament-actions::group label not working?
<x-filament-actions::group
:actions="[
$this->createFromTemplateAction,
$this->createNewAction,
]"
label="Actions"
button
icon="phosphor-caret-down"
iconPosition={{\Filament\Support\Enums\IconPosition::After}}
size={{\Filament\Support\Enums\ActionSize::Large}}
color="primary"
/>
<x-filament-actions::group
:actions="[
$this->createFromTemplateAction,
$this->createNewAction,
]"
label="Actions"
button
icon="phosphor-caret-down"
iconPosition={{\Filament\Support\Enums\IconPosition::After}}
size={{\Filament\Support\Enums\ActionSize::Large}}
color="primary"
/>
7 replies
FFilament
Created by LiruLiruLiru on 12/20/2023 in #❓┊help
filament-actions::group label not working?
Add the meta tag "button"
7 replies
FFilament
Created by bennett on 1/19/2024 in #❓┊help
How do you define the layout for a header action form?
Yep, That did it. Thanks!
7 replies
FFilament
Created by bennett on 1/19/2024 in #❓┊help
How do you define the layout for a header action form?
Like a Section or a Grid?
7 replies
FFilament
Created by bennett on 1/19/2024 in #❓┊help
How do you define the layout for a header action form?
Update: I was able to accomplish the desired effect, but it feels wrong. Any input appreciated.
->form(function($livewire){

return (new Form($livewire))
->schema([
TextInput::make('street_one')
->label('Street One'),
TextInput::make('street_two')
->label('Street Two'),
TextInput::make('city')
->label('City'),
Select::make('state')
->label('State')
->options(State::pluck('abbreviation', 'name')->toArray())
->searchable(),
TextInput::make('zip')
->label('Zip'),

])->columns(2);
})
->form(function($livewire){

return (new Form($livewire))
->schema([
TextInput::make('street_one')
->label('Street One'),
TextInput::make('street_two')
->label('Street Two'),
TextInput::make('city')
->label('City'),
Select::make('state')
->label('State')
->options(State::pluck('abbreviation', 'name')->toArray())
->searchable(),
TextInput::make('zip')
->label('Zip'),

])->columns(2);
})
7 replies
FFilament
Created by bennett on 1/7/2024 in #❓┊help
Modal won't display from Infolist
Thanks for the help
10 replies