Manage fields
Use AI to generate fields
If you use Retool Database, you can use AI to generate a form for your use case. From a blank form, select Click here to start with AI, and provide your use case. Fields are then automatically generated, which you can further customize. A table named after your form is created when you publish the form, and contains columns for each input field in your form.
Add presentation fields
You can add Text, Image, and Divider fields from the + button. These can help you organize your form and provide additional context to users. Presentation fields do not affect data written to your database.
Add custom fields
You can add custom fields to forms connected to Retool Database. When you publish your form, a column is inserted into your database with the settings from the custom field. Custom fields default to use the name of the input component, so you may want to change this name before you publish.
Hide fields
It can be useful to hide database fields, especially those which have default values set by your database, from your form.
When you hide a field from the sidebar, the field is not passed to the database insert request. You may want to use this to hide id
, created_at
, or other auto-generated fields, so your database can handle these inserts.
To hide a field from users, but still include it in the database insert request, use the Hidden field in the field settings. You can use this conditionally hide fields based on any criteria. For example, to hide a custom_name
field when the status
field is not 'new'
, you could set Hidden to {{ status.value !== 'new' }}
. When the status
field is not new
, the custom_name
field is set to null
.
Delete fields
You can delete fields from your form by clicking the delete icon. Non-presentation fields must be hidden before you can delete them.