How to dynamicly show/hide certain wizard step based on choice?
This did not work
Step::make('step')
->visible(fn ($get) => $get('show') === 'no')
show field has ->live()3 Replies
What is the type of
show, is it a Select or another field? Also you typed ->livel() with an l before the parenthesis is it a typo?No typo in codebase.
Type of show field does not matter, but value.
I.e. I have select or toggle or soemthing named - show.
within step I add placeholder, ->content(fn ($get) => $get('show')) (same as in comparison in step visibility ).
when I update toggle,select etc I see value changes but step visibility stays same as was initially either hidden or visible
I did test all version if you are pointing to == vs ===
I don't think you can actually hide the steps, but I know you can
skip the steps based on previous conditions.
I've made a logic below to skip a step, if based on X condition we don't need something.
This might help to make similar logic of what you need.