Umbraco forms multi step - determine which step to show
Hey all,
Has anyone been able to determine which step to show and how to achieve this?
Ideally i would like to pass something in the querystring like ?step=1 which would go to appropriate step - i have not been able to get a working solution for this yet.
I actually implemented my own workaround as i could not find a way to fix this via umbraco.
I am using a cookie when the user clicks whatever step they want to go to - it goes to a controller method sets a cookie then does a check on the Form.cshtml to check which step to go to and sets the model value.
So basically i had 3 buttons at the results page of my form which related to each step, If the user clicked on button 1 it would go to a controller passing a value of "step1" to the controller.
I would then set a cookie within that controller method and return the user to the form page. When the form page loads it will hit Render.cshtml which lives in /Views/Partials/Forms/Themes/default/Render.cshtml - I carried out a check like so: -
This then allows you to control the model at point of rendering the form. Once the correct model values have been set i clear the cookie I had previously set in the controller.
Umbraco forms multi step - determine which step to show
Hey all,
Has anyone been able to determine which step to show and how to achieve this?
Ideally i would like to pass something in the querystring like ?step=1 which would go to appropriate step - i have not been able to get a working solution for this yet.
Anyone any ideas?
Cheers Dale
Did you ever fix this?
Hey Ian,
I actually implemented my own workaround as i could not find a way to fix this via umbraco.
I am using a cookie when the user clicks whatever step they want to go to - it goes to a controller method sets a cookie then does a check on the Form.cshtml to check which step to go to and sets the model value.
Can provide some more info if you need it.
Cheers Dale
Please do expand, this would be useful to know.
Hey Daniel,
So basically i had 3 buttons at the results page of my form which related to each step, If the user clicked on button 1 it would go to a controller passing a value of "step1" to the controller.
I would then set a cookie within that controller method and return the user to the form page. When the form page loads it will hit Render.cshtml which lives in /Views/Partials/Forms/Themes/default/Render.cshtml - I carried out a check like so: -
This then allows you to control the model at point of rendering the form. Once the correct model values have been set i clear the cookie I had previously set in the controller.
Hope this helps.
Cheers
Dale
is working on a reply...