esorone
esorone
FFilament
Created by esorone on 8/30/2023 in #❓┊help
->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')
),
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.
2 replies
FFilament
Created by esorone on 8/30/2023 in #❓┊help
6 records and step wizard
Hey All, I building a survey wizard and I have just 6 questions. But based on these questions I have some follow up questions. All the followup are working but I would like to have questions one in step one and question two in step two. Im using the form class but cannot achieve this. Know I doing this
Forms\Components\Select::make('main_question_id')
->label('vraag 1.1')
->options(MainQuestion::all()->pluck('id', 'id')->toArray())
->reactive()
->afterStateUpdated(fn(callable $set) => $set('sub_question_id', null)) ,
Forms\Components\Select::make('main_question_id')
->label('vraag 1.1')
->options(MainQuestion::all()->pluck('id', 'id')->toArray())
->reactive()
->afterStateUpdated(fn(callable $set) => $set('sub_question_id', null)) ,
But instead of a pull down of each question with the possibility that they forget a question, I would like to use the step wizard. So step on ID =1 and Step 2 ID-2.. Hope someone is able to help me with this. Or point me to a better approach
2 replies
FFilament
Created by esorone on 8/28/2023 in #❓┊help
Concept question how to create a decision questionair
Good morning, I started using filament last month and gradually I am getting further and further along. CRUDS, MorphToMany, etc all works. Now I have a question how to proceed with the following. So for now it is not really a technical question, but more a question about a concept. I would like to run a survey. And depending on a boolean, the next question will come. Example, Question: I have my customer data at hand: If YES, then go to the next question, if no, then there will be another question. But I don't have a concept for front ends like this. Could someone push me in a direction? Documentation, tutorial, example. Everything is welcome
4 replies