Dynamic Steps based on user input

4 posts, 0 answers
  1. Jacques
    Jacques avatar
    135 posts
    Member since:
    Jun 2007

    Posted 03 Dec 2015 Link to this post

    I have a step in my wizard that collects basic information for the user AND the user's spouse but only if the user chose Include Spouse in a previous step.

    One way I've thought of resolving this is by duplicating the step called Personal Details in the first one having the input controls for only the user and in the duplicate have input controls for both the user and the spouse. Then if the user chooses to include Spouse we can just hide/remove the unecessary step?

    There doesn't seem to be anything in the API that allows you to affectively Switch Off steps and by that I mean they should dissappear out of the navigation and progress bars and the next button should know to skip them if they are switched off.

     

    WizardStep.hide - just hides the content of the step
    WizardSteps.remove - throws exception "TypeError: c.unselect is not a function" (Javascript)
    WizardSteps.removeAt - same as previous exception

     


     
  2. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 08 Dec 2015 Link to this post

    Hi,

    Yes indeed -setting steps visible true and false is currently not supported by the control. In such scenario you can consider adding and removing the step as for example it is done in this online demo.

    Regards,
    Plamen
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jacques
    Jacques avatar
    135 posts
    Member since:
    Jun 2007

    Posted 08 Dec 2015 in reply to Plamen Link to this post

    Paul, did you read my entire post?

    1. This is JavaScript
    2. I would assume that REMOVE or REMOVEAT is the API call I COULD have used but as you'll notice in my post it's throwing exceptions "c.unselect is not a function" (Javascript)"
    Note: Both those JavaScript API calls are failing!
     
  5. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 09 Dec 2015 Link to this post

    Hi,

    Thank you for sharing the javascript error I have logged it for fixing and we will do our best to fix it as soon as possible.

    As for the scenario itself - unfortunately visibly adding and removing steps from the client is not supported by the control. The remove  and removeAt  functions would only remove the step from the collection object.

    Regards,
    Plamen
    Telerik
Back to Top