1. Fields
  2. Object Builder Field

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.

loading...

Result

The field will be displayed as a field that allows you to build custom objects in the form, as below: Preview of an objectbuilder field in a form

The resultant data will be available in the stubpost.data as:

loading...

This can be substituted with eg. ~~stubpost.data.special_requests where required.

Parameters

See fields for common field parameters like validation and conditional rendering.

params.key_field_spec

optional
object

A field specification object that defines what kind of field the key should be.

Default: text field


params.value_field_spec

optional
object

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.

loading...

Demo Gif

Custom key_field_spec demo

Resultant Data

loading...