Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Jun 02, 2016 @ 06:21
    Jeffrey Schoemaker
    0

    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.

    • 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.

    Hope anyone could help me out!

    Cheers, Jeffrey

  • Lars-Erik Aabech 350 posts 1102 karma points MVP 8x c-trib
    Jun 02, 2016 @ 08:09
    Lars-Erik Aabech
    100

    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. :)

  • Gerjan 19 posts 78 karma points
    Jun 02, 2016 @ 11:35
    Gerjan
    0

    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)

  • Antoinette Silago 21 posts 92 karma points notactivated
    Jan 18, 2017 @ 23:17
    Antoinette Silago
    0

    Is this possible to do in a partial view? Based on certain user selection and submits page, it will display different pages?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies