This is a migrated thread and some comments may be shown as answers.

Dynamic Steps based on user input

3 Answers 279 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 2
Jacques asked on 03 Dec 2015, 01:42 PM

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

 


 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 08 Dec 2015, 08:35 AM
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
0
Jacques
Top achievements
Rank 2
answered on 08 Dec 2015, 09:13 AM

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!
 
0
Plamen
Telerik team
answered on 09 Dec 2015, 07:58 AM
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
Tags
Wizard
Asked by
Jacques
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Jacques
Top achievements
Rank 2
Share this question
or