interface FormElement
@formium/client
Form element interface. This is a polymorphic interface that is the union of all possible element options within a given schema.
Props | Description |
---|---|
actions | Array<FormElementAction> The list of logic actions for this element. |
allowOther | boolean Allow an other option in list. Only applies to choice or select options. |
defaultValue | string Initial value of the element. Does not apply to choice elements. |
description | string The element description |
dynamic | boolean Can the field be dynamically populated via URL query? |
dynamicParam | string The name of the dynamic parameter (URL query parameter) |
hidden | boolean Is the element hidden (initially)? |
id | string Unique identifier Required |
items | Array<string> The list of child element ids belonging to this element. For a page element, these would be ids of elements. For a Radio field, these would be the list of choice ids. |
maxLength | number Maximum number of characters allowed in the answer, must be a positive integer. |
maxValue | number Maximum value allowed in the answer, must be a positive integer. |
minLength | number Minimum number of characters allowed in the answer, must be a positive integer. |
minValue | number Minimum value allowed in the answer, must be a positive integer. |
placeholder | string The input placeholder (if applicable) |
randomize | boolean Should randomize options? |
required | boolean Is the element required? |
requiredText | string Custom error text when empty, but required |
slug | string Administrative slug Required |
title | string Title of element |
type | |
uploadTypes | Array<FormElementUploadTypes> The set of allowed upload types |