what could be a possible approach to implement a multi-step-form, where a radiobuttonlist in the first step determines which steps are reachable and visible in the form?
Let's say we have a form with six steps, and on the first step there is a radiobuttonlist with the following options.
Show step 2
Show step 3
Show step 4
Show step 5
If you check only step 3, the "next" button on the first step would take you to step 3, instead of step 2.
I don't think it's possible out of the box, or is it? I have no problem to code some stuff up, but I have no clue where to begin my approach.
As mentioned on twitter, if you derive a controller form the builtin controller, you can write some custom logic using the conditions on fieldsets or fields.
Jeffrey Schoemaker it does is possible with the standard forms. Set the default condition of a step to 'hide' or something. And only show when the other codition is true (checkbox value x)
Conditional next step in a multiple-step form
Hi all,
what could be a possible approach to implement a multi-step-form, where a radiobuttonlist in the first step determines which steps are reachable and visible in the form?
Let's say we have a form with six steps, and on the first step there is a radiobuttonlist with the following options.
If you check only step 3, the "next" button on the first step would take you to step 3, instead of step 2.
I don't think it's possible out of the box, or is it? I have no problem to code some stuff up, but I have no clue where to begin my approach.
Hope anyone could help me out!
Cheers, Jeffrey
Hi,
As mentioned on twitter, if you derive a controller form the builtin controller, you can write some custom logic using the conditions on fieldsets or fields.
Here's a sample:
https://gist.github.com/lars-erik/7a0028f28b93385574b68ce11276bd7a
I use it with fieldset conditions to make pages go away if not relevant. :)
Jeffrey Schoemaker it does is possible with the standard forms. Set the default condition of a step to 'hide' or something. And only show when the other codition is true (checkbox value x)
Is this possible to do in a partial view? Based on certain user selection and submits page, it will display different pages?
is working on a reply...