Multi-Step Form Required Input Issue

Hi! - I have an issue with a multi-step form I have created… Essentially, what I am doing, is I have a custom state that is based upon the “step” in the form in which the person is filling out, and I show and hide based upon this.

For example, if they click “Next” at the bottom, what happens on bubble is: set the step to step 1+1 (which equals step 2) and then step 2 shows the next part of the form (inputs for the person to enter)…

The problem that I am having is that for “step 1” for example, I have a few elements as “this input cannot be empty”… However, when going to step 2 and step 3 and progressing on the form, on the last step of the form when I submit, it will submit the form (and its bypasses/overrides that those fields in step 1 that are not visible and required to be selected)…

How can I make the elements that are required n a hidden group due to the current state still uphold the required value?

I would maybe save the form inputs when each next button is clicked rather than submitting at the end. This way the data from step one will be saved ? I don’t know if that is answering your question ? Kylie

Bubble will validate any required field whenever a field is used in a workflow. The workflow will only run once all required fields are correct.

One way as Kylie explained would be to create the new item and store the form field when clicking next. Any required fields not completed will be shown an error and the workflow will not run.

Alternatively, you can store the value of each input in a state which will also have the same effect.

This topic was automatically closed after 70 days. New replies are no longer allowed.