I'm relatively new to the Retool / SQL / JS world so please bare with me if my terminology or ideas of what this platform is capable of are off.
I have a form with multiple fields and I want to show and hide other fields based on specific conditions being met from the value of fields.
For example: my basic form has 3 fields:
How do I dynamically add or remove additional fields based on the original field values? By dynamically I mean that the form with change on the fly for each scenario and reset to default when complete.
Example: if Age = 18 then show 2 additional fields called "Favourite alcohol" & "Favourite pub" and if not then continue to hide those fields.
And to push it further how could I stack multiples?
if Age = 0-16 dont change and
if Age = 18,19,20 show X Fields and
if Age=21,22,33 show Y Fields and
if Age=24,25,26 show Z Fields
For some context, I am building an event log form to write to a SQL table but I have some clients that require additional information and some that just need basic information. To make it operator friendly I don't want to always show all fields and I don't want to have to make multiple variants of the same form because that would require the operator to know which form to use for each client. If the form can be dynamic based on what client is selected then my operator has an easier time filling out the forms.