Fields
Object Builder Field
The Object Builder Field allows for creating an object field.
This field builds up a JS object of key value pairs.
It presents a key field and a value field, within which the user can capture the key value pairs.
Basic usage
Adds an objectbuilder
field to the fields of an action.
Result
The field will be displayed as a field that allows you to build custom objects in the form, as below:
The resultant data will be available in the stubpost.data
as:
This can be substituted with eg. ~~stubpost.data.special_requests
where required.
Parameters
See fields for common field parameters like validation and conditional rendering.
optional object
params.key_field_spec A field specification object that defines what kind of field the key should be.
Default: text
field
optional object
params.value_field_spec A field specification object that defines what kind of field the value should be.
Default: text
field
Examples
Custom key_field_spec
The key_field_spec
parameter has been configred to use a select
field.
This means that the key field will now render a select
field, and all the usual params of the select field can be passed through.