FilamentF
Filament3y ago
1 reply
esorone

->declined() not working on a toggle button.

Hello, as mentioned I working on a 6 step wizard. Every step have a different question but are depending on each other. I have the following code:
(not sure Why I can past the code, but it is in the text file)

My idea is to start over again at the next step. So I used the reactive() method to start with a disabled button, but it is not working. Any ideas?

            Toggle::make('is_applicable_main')
                                        ->label('Nee / Ja')
                                        ->reactive()
                                        ->requiredWith('subquestion')
                                        ->afterStateUpdated(
                                            fn($state, callable $set) => $state ? $set('sub_question_id',
                                                null) : $set('sub_question_id',
                                                'hidden')
                                        ),


Hope someone has an idea.
Was this page helpful?