Dropdown
This field is used to select an option from the given options in the form of a dropdown
{"type": "dropdown","id": "category","label": "Product Category","showInTable": true,"isRequired": true,"defaultValue": "Option 1","options": ["Option 1", "Option 2", "Option 3", "Option 4"]}
The example above allows the user to select an option in the form of a dropdown from the given options. The default value in this example has been set to Option 1 using the defaultValue function.
Field Attributes
Name | Type | Description |
---|---|---|
id | string | Assigns a name for the given field on the backend. This name can be used to refer this field in another field |
label | string | Adds a label to the given field |
isRequired | boolean | Makes a field mandatory |
showInTable | boolean | Displays the field in a table after saving the entry |
options | array | Stores the options presented to the user to select |
defaultValue | string | Sets a default value for the given field |