Upon navigation to a new step (on the same page), input data reset's without trigger

I have a pop-up sidebar that houses a “Tabs element” with 8 steps. I navigate between the tabs inside this element using a button which triggers a workflow to change the tab value. This resets the input values of the previous step.

A walkaround I am using is that I have created an Object variable for each step that is updated when each input (within a step) is changed and then bind the variable data to the input.

Hi @buildnocode :wave:

That sounds like a good approach if you are using a multi-step form with different tabs that are conditionally rendered. Did you have a question you needed help with?

Apologies. I should have made the question more clear.

To me, creating a variable to store the object feels like a an additional step. I don’t want the inputs of the previous step to disappear without me creating a reset variables action.

Is this a feature or a bug?

No worries!

Well, if your steps are conditionally rendered, it’s a feature because when you move on to the next step, the elements (and inputs!) from the previous step are no longer rendered. In effect, they no longer exist.

You can learn more about conditional rendering here if you’d like.

That said, you don’t need to create a separate variable for each step. You could have one object variable for example answers that you update step after step with a partial update:

In the example above, before moving on to step 2 of our form, we update the answers variable with the name and then the job title of the user.

Does that make sense?

1 Like