Skip to main content

Field types

Seven interactive field types are supported. Every field tag follows the pattern:

[fieldType, name, ...field-specific args, width|height]

The name slot is the field identifier exposed to PDF readers, Word, and any downstream form-data extraction. Pick descriptive names — they show up in form-data exports.

Text field

A single-line text input.

[textfield, name, defaultValue, width|height]
SlotDescription
nameUnique field name
defaultValuePre-filled text. Use empty string for blank, or wrap in single quotes for $data refs
width|heightField dimensions in points
{ "p": "Full Name: [textfield, fullName, John Doe, 200|20]" }
{ "p": "Email: [textfield, email, , 250|20]" }

Text area

A multi-line text input for longer content.

[textarea, name, defaultValue, width|height]
{ "p": "Additional notes:[br][textarea, notes, , 400|80]" }
{ "p": "[textarea, comments, Enter your feedback here, 350|60]" }

Checkbox

A boolean toggle.

[checkbox, name, checked, width|height]
SlotDescription
nameUnique field name
checkedInitial state: true or false
width|heightCheckbox dimensions in points (typically square, 14–16)
{ "p": "[checkbox, termsAccepted, false, 16|16] I accept the terms and conditions" }

Used for checklists:

{ "p": "[checkbox, item1, true, 14|14] Background check complete" }

Radio button

A selectable button within a mutually-exclusive group.

[radio, name, group, selected, width|height]
SlotDescription
nameUnique field name (each radio has its own)
groupGroup name — radios sharing a group are mutually exclusive
selectedtrue or false
width|heightRadio dimensions in points (typically square, 14)
{ "p": "[radio, optionA, paymentMethod, true, 14|14] Credit Card" }
{ "p": "[radio, optionB, paymentMethod, false, 14|14] Bank Transfer" }
{ "p": "[radio, optionC, paymentMethod, false, 14|14] Cheque" }

Selecting one automatically clears the others in the same group.

Choice field (dropdown)

A dropdown selection from predefined options.

[choicefield, name, opt1|opt2|opt3, selectedIndex, width|height]
SlotDescription
nameUnique field name
optionsPipe-separated option list
selectedIndexZero-based index of the initially selected option
width|heightField dimensions in points
{ "p": "Service Level: [choicefield, serviceLevel, Economy|Standard|Express|Next-Day, 1, 150|20]" }

In this example, "Standard" (index 1) is initially selected.

List box

A scrollable list of options with optional multi-select.

[listbox, name, opt1|opt2|opt3, defaultValue, multi, width|height]
SlotDescription
nameUnique field name
optionsPipe-separated option list
defaultValueDefault selected value (in single quotes; empty '' for none)
multitrue to allow multiple selections, false for single
width|heightField dimensions in points
{ "p": "Skills: [listbox, skills, Python|Java|Go|Rust, '', true, 150|60]" }

Date picker

A text field that PDF readers render with a calendar widget.

[datepicker, name, defaultValue, width|height]
SlotDescription
nameUnique field name
defaultValuePre-filled date (ISO 8601: YYYY-MM-DD) or empty string
width|heightField dimensions in points
{ "p": "Effective date: [datepicker, effectiveDate, 2026-01-01, 140|22]" }

Approval form — putting it all together

{
"content": [
{ "h2": "Approval Form" },
{ "p": "Reviewer: [textfield, reviewer, , 250|22]" },
{ "p": "Department: [choicefield, dept, Engineering|Legal|Finance, 0, 200|22]" },
{ "p": "Decision:" },
{ "p": "[radio, approve, decision, false, 14|14] Approved" },
{ "p": "[radio, reject, decision, false, 14|14] Rejected" },
{ "p": "[radio, defer, decision, false, 14|14] Deferred" },
{ "p": "[checkbox, final, false, 14|14] This decision is final and binding" },
{ "p": "Effective: [datepicker, effective, , 140|22]" },
{ "p": "Notes:[br][textarea, notes, , 400|80]" }
]
}