It can sometimes be useful to enable/disable a field based on the response to another field. For example, we may want to enable a text area when a user ticks a checkbox. This can be achieved using the powerful logic functionality built into Team Forms. You can use the steps outlined below to achieve this:
Drag and drop a checkbox into your form then drag and drop a text area into your form
Open the settings for the component you wish to enable/disable dynamically. Under the display tab check the "disabled" option to have this disabled by default
Next go to the logic tab click the "+ Add logic" button under advanced logic. Here we will add some logic to dynamically enable the component under some condition.
Give the logic rule a name and then set the trigger type to "simple". Next set up the condition so that the logic is only triggered when the checkbox has the value true as shown in the screenshot below.
β
Note that if you want to enable a component based on some more complex conditions you can also use the "JavaScript" trigger type instead of "Simple".
β
βNext click the "+ Add action" button. This will create the action which will trigger any time the trigger condition created earlier is met.
Give the action a name and set the "Type" to "Property". This will reveal a drop-down menu to select which setting to update.
Select the "Disabled" property to update and then set the state to false as show in the image below:
βFinally hit "Save action" and "Save Logic"
Here is an example of the final output come
β