Displaying Controls Dynamically
Last updated
Was this helpful?
Last updated
Was this helpful?
It is possible to create a form with input fields that display dinamically as users enter data. This can be helpful to direct the user to the next input field or to keep a specifc filling order in cases where inputs are dependent on each other. This guide will walk you through the basics of building a form that unfolds fields based on user input.
Let's create a to collect book reviews. We'll start by adding the following Web Controls to our first Web Page:
A to hold the entire form and a for the title.
A Container with a Label and a Contol nested for the book title.
A Container with a Label and a Control nested for the rating.
A Container with a Label and a Control nested for the review.
A submit .
The form should look like this in Studio:
Controls have a property called Is Visible that evaluates to TRUE
or FALSE
. When it evaluates to TRUE
, the Control will be visible, whereas if it evaluates to FALSE
, then the Control won't show up. The Is Visible State is dynamically recalculated, so if the Value in a field changes from FALSE
to TRUE
, the Control will show up.
Then select the Container for the review and set the Is Visible State to:
By putting visibility dependent on the rating, and the rating having the visibility dependent on the title, these last two fields won't show until values for the title and then the rating are entered.
We can modify the submit Button in the same way by setting the Is Visible State to:
Now let's start by selecting the Rating Container and going to the Advanced tab in the Inspector. In State > Is Visible, we'll enter the function followed by the Variable corresponding to the book title's Text Input, which in this case is the default one text_input
:
📘 Using will hide the entire container, including the Label, until the user enters a title for the book. To understand more about empty states, check out .
Test the form in to see how Controls display dinamically: