This topic is locked
[SOLVED]

 Hiding a step based on a value in a previous step

7/20/2020 3:37:02 PM
PHPRunner General questions
K
keithh0427 author

I'm using multi-steps for my add and edit pages in my project.
Is is possible to hide one of the multi-steps based on the value in a previous step? None of the fields are required in the step I want to hide. I would rather hide one of the steps instead of hiding all the elements within that particular step.
If it's possible, can you point me in the right direction?
I've searched the forums and the manu, but cannot find a reference to hide a step.

Sergey Kornilov admin 7/22/2020

Unfortunately, we do not have this kind of functionality. While hiding the tab with the step name is possible ( $("li[data-step=1]").hide(); ), clicking Next will still take you to that step.
We'll add API for steps at some point. Meanwhile you can replace the 'Next' button with your own button and account for tab visibility while taking the user to the next step.
This is how you can make a certain tab selected:

https://xlinesoft.com/phprunner/docs/how_to_work_with_tab_2.htm

K
keithh0427 author 7/23/2020

Thanks, Sergey.
I'll do that.