Skip to main content

Custom Form Fields

You can add custom form fields to the competition entry process for guest entries.

note

The system will only display custom fields when entering as a guest.

You can add fields to the

  • entry header
  • entrant details

Fields to be added to a page are described using JSON.

Basic JSON format​

The basic description format is as follows;

{
"header": [

],
"entrants": [

]
}

Fields are displayed in the order they are defined in the respective header and entrants arrays.

Available fields​

The following field types are available;

Textbox​

For strings of up to 255 characters.

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.
helpHelp text associated with the field.

Textarea​

For longer strings with multiple lines allowed.

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.
helpHelp text associated with the field.

Number​

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.
helpHelp text associated with the field.
precision✅Number of decimal places to support.

Datetime​

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.
helpHelp text associated with the field.
minMinimum datetime.
maxMaximum datetime.
showTimeInputWhether to show the time picker. Default false.

Select​

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.
helpHelp text associated with the field.
values✅Array of value/name pairs.

The values array looks like;

[
{ value: "draft", name: "Draft" },
{ value: "published", name: "Published" },
{ value: "paused", name: "Paused" },
{ value: "closed", name: "Closed" },
{ value: "cancelled", name: "Cancelled" },
]

Checkbox​

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.

Radio​

PropertyRequiredDescription
name✅Name of the field. Must be unique.
label✅Field label.
values✅Array of value/name pairs.

<p>​

PropertyRequiredDescription
value✅Text to display.

Paragraph of text.