Could someone guide me with creating a dynamic form in Retool?

Hello there,

I am working on a project where I need to create a dynamic form in Retool. The form should have a set of fields that are dynamically generated based on a selected option from a dropdown menu.

Specifically, I have a dropdown menu that fetches data from a database. When a user selects an option from the dropdown, I want the form to display a set of fields related to that option. For example, if the user selects "Customer Information," the form should display fields like name, email, and phone number.

If they select "Product Information," it should display fields like product name, description, and price.

https://community.retool.com/t/create-dynamically-growing-form-power/9751

I have tried using the visible property of the form fields to show/hide them based on the selected option, but I'm having trouble dynamically generating the fields based on the selected option.

Could someone please guide me on how to achieve this functionality in Retool?

Any help or assistance would be greatly appreciated.

Thankyou in advance.

Hi there @tysonzach,

How many forms will you have? If they are not many, then maybe the best way of doing it is to have multiple forms in a tabbed container, and then dynamically change which viewKey is showing based on the selected item of your select component. This may also facilitate creating and mapping the quereis for each of your forms, as you could simple just add form.data to the object field.