Dynamic form creation help

Hi all ,

I have a question about the possibilty to make a form dynamic , eg by adding/removing input fields when the user clicks a button .

If possible , it is necessary to involve the database for doing it ?.

Thanks in advance for the help.

Vincenzo

You may need to use the text input component and use visibility conditions. I had to do the same process for a custom form I made because the prebuilt form wouldn’t perform the way I had desired on a previous build I made.

Thanks zwood , but when i choose a button i dont’ see a trigger for the visibility of the text input , only a change of value of the text input is available . Do I have to create a visibility boolean property for each text input of the form ?

Thanks

Depends on what you have set up. If it’s text input fields. You can see the the next field to only be visible if the previous input field is not equal to empty. This is where titling your input fields comes in handy. So it’s easier to search for them. Otherwise you’ll be looking at a list of input field 1, input field 2, ect.

Say you have an input field that captures the user’s name

The next input field captures their birthday. Title the name input as “Input user name” and title the birthday input as “Input user birthday”. Set these names in the component settings up at the top left.

Now you can go into the birthday input field and set the visibility to only visible when input user name is not equal to empty

Hi @v.borsellino,

Welcome to the community :partying_face:

Addition to the great replies by @Zwood!

Is it possible to give an example about the result you need? Maybe with some screenshots?

Thank you

Please correct me if I’m wrong @dilon_perera, If your wanting different input fields to be visible by using a button, you could do it by screen. In other words only have the inputs you want visible on once screen then when you want to move to the next section put those input fields on a different screen using the button to link the two pages to each other.

The next option may be a bit more complicated.

This requires true/false values in the database for every button involved in this dynamic form your creating (I would title these buttons as “button name” clicked) then in the button actions, create a UPDATE action marking that button’s true or false value as true. Then move to your input fields and use the visibility only visible when “button name” clicked is true.

Oh you mean add the different inputs to different screens? Like multi-step form right?

Yeah you can use the Users collection with true/false properties to show hide. Or you can use Inputs with the Change input value action. I read some posts in the forum that updating inputs are faster than updating database properties.

It would be really helpful if Vincent ( @v.borsellino ) can add a example that what he want to achieve so we can propose the best solution :raised_hands:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.