bahamasoul
bahamasoul
FFilament
Created by bahamasoul on 11/13/2024 in #❓┊help
Form builder - Programmatically step with Wizard?
Good day, I have a two part question 1. Is there a way for me to programmatically go to the next step in the Wizard component? My last step is just a success page, I know I can use the "afterValidation" lifecycle hook to process a payment on that particular step, i then want to take the user to the last step (success page) once that is done. How can I do this? 2. I know I can change the label for all the previous and next step buttons using "nextAction", am I able to do this on an individual step though? Any help is greatly appreciated!
4 replies
FFilament
Created by bahamasoul on 7/11/2023 in #❓┊help
Disable 24-hour time?
4 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
16 replies
FFilament
Created by bahamasoul on 3/8/2023 in #❓┊help
Trying to update Select field options when another field is updated?
Here is my code below. locations is a variable on my livewire component that contains the form schema
Toggle::make('floridaOnly')
->default(true)
->reactive()
->afterStateUpdated(function (Closure $set, $state) {
$this->locations = AlamoLocationsFormatter::getFilterOptions(
SearchAlamoVehicleLocations::handle()->body(), $state
);
})
->columnSpan(3),
Select::make('fromLocation')
->options($this->locations)
->searchable()
->required(),
Toggle::make('floridaOnly')
->default(true)
->reactive()
->afterStateUpdated(function (Closure $set, $state) {
$this->locations = AlamoLocationsFormatter::getFilterOptions(
SearchAlamoVehicleLocations::handle()->body(), $state
);
})
->columnSpan(3),
Select::make('fromLocation')
->options($this->locations)
->searchable()
->required(),
Not sure if "after state updated" is where this type of logic should go. But basically, I send the state in (true or false) and based on that i run a filter and return the locations. The locations value is being changed by this afterStateUpdated hook, but the options in the below select field "fromLocation" aren't being updated.
3 replies