`<forms:variableinput />`
A rich text input that renders [? ?] expression chips with a variable picker.
Wraps the <oncord-variable-input> web component with integrated form handling.
Attributes
- `autoFocus`
bool
Auto Focus
If true, this control will attempt to focus itself after the page has loaded. Note that only one element may be focused on the page at a time.
Default = false
- `dataColumn`
Sets the data column
The datacolumn links the form item to a key used when getting or saving from a component (as defined by the parent form).
- `disabled`
bool
Disable Input
Disables the input, preventing user interaction
- `height`
string
Height
Sets the height of the element. The default units are pixels. include the percentage symbol % to user percentage values.
- `id`
string
Most form items need a unique id so that they can submit data to the server. No two form items may have the same id. For situations where multiple form items submit to the same field, see the
name attribute. Id's that begin with
contact_ will automatically save Contact information to the Contact database as long as the user has entered enough identifying information (ideally Name and Email). Check the
Contact Fields page for correct field names.
- `name`
string
Sets the name of the form item. Most of the time, the id attribute will suffice. However, with form items that post multiple values into an array, each item will need to have the same name, followed by []. For example three controls with name="data[]", will all post into 'data'.
Radio buttons belonging to the same group will have to share the same name.
An empty name="" leaves the item unnamed, so the browser never posts it to the server (e.g. card fields a payment gateway tokenizes in the browser).
- `placeholder`
string
Placeholder
Placeholder text shown when the input is empty.
- `rows`
int
Rows
Number of visible text rows for the input area.
- `saveState`
bool
Restore state on reload
Whether the value of the input persists when the page is revisited.
Default = false
- `transformations`
Value Transformations
Sets the value transformations to be applied to the value of the form item as a comma separated string.
- `validations`
Validations
Sets the validations to be applied to the value of the form item as a comma separated string.
Eg: validations="mandatory"
When no validations attribute value is set, the form item is optional.
- `variables`
array
Variables
A grouped array of available variables to show in the variable picker, or a JSON-encoded string of the same shape. Each section maps to a list of variables of shape: ['name' => '...', 'expression' => '[? ... ?]', 'type' => '...', 'description' => '...'] (the full descriptor, including label and entity_ref drill-downs, is the VariableDescriptor typedef in Framework/Assets/JavaScript/_public/WebComponents/oncord/expression/variables.js).
- `width`
string
Width
Sets the width of the element. The default units are pixels. include the percentage symbol % to user percentage values.