Basic Example (Fields Array)
Thefields array is the primary format produced by the WYSIWYG Builder’s visual form designer.
Complete Example (Fields Array)
Example Code
JSON Schema Format (Advanced)
For advanced use cases, you can provide a standard JSON Schema instead of a fields array. The form renderer will use SchemaAutoForm to auto-generate the UI.Properties
string
required
Identifies this as a form blockMust be
formstring
required
The endpoint URL to POST form data to when submitted
string
default:"POST"
required
The HTTP method for the form submissionAllowed values:
POST, PUT, PATCHstring
default:"Submit"
required
The label text for the submit button
string
required
The label text for an optional cancel button. Leave empty to hide the cancel button.
string
required
A unique identifier for this form block. Included in the submission payload.
string
default:"stacked"
required
Controls how form fields are arrangedAllowed values:
stacked (vertical), columns (side-by-side), inline (horizontal)array
required
An array of field objects that define the form fields. This is the format produced by the visual builder. Each field has properties like
id, field_type, label, placeholder, required, options, etc. See Field Types below.object
required
A JSON Schema object that defines the form fields. Alternative to
fields for advanced use cases. See JSON Schema Field Types below.object
required
Default values for the form fields. Keys should match field IDs (for
fields array) or property names (for schema).Field Types (Fields Array)
When using thefields array format, each field object supports the following field_type values:
Field Properties
Field Types (JSON Schema)
When using theschema format, field types are determined by the JSON Schema type and format:
Submission Payload
When the form is submitted, the following payload is POSTed to theaction_url:
Server Response
The server can respond with the same action types as Button responses:Nesting Rules
Theform block can be placed inside:
- Root level
- Section
- Wizard Step
- Column Layout columns
Usage Notes
- The WYSIWYG Builder uses the
fieldsarray format with its visual form designer — no JSON editing required - When using
fields, a JSON Schema is generated internally for rendering via SchemaAutoForm - Both
fieldsandschemaformats produce identical rendered forms - Forms support client-side validation before submission
- Server-side validation errors can be returned and displayed inline
