Skip to main content
Documentation

Form Field Reference

Form fields are defined inside input blocks. Each field has a kind that determines the input type.

Common Properties

All field kinds share these properties:

PropertyTypeRequiredDescription
namestringYesUnique field identifier (used as key in submitted data)
labelstringYesDisplay label shown to the operator
kindstringYesField type (see below)
requiredbooleanNoWhether the field must be filled (default: true)
placeholderstringNoPlaceholder text
description_mdsvexstringNoHelp text in markdown, shown below the field

Text

Single-line text input.

{ "name": "company_name", "label": "Company Name", "kind": "text" }

Submitted value: "Acme Corp"

Textarea

Multi-line text area.

{ "name": "notes", "label": "Additional Notes", "kind": "textarea", "required": false }

Submitted value: "Line 1\nLine 2"

Number

Numeric input.

{ "name": "quantity", "label": "Quantity", "kind": "number" }

Submitted value: 42 (number)

Select

Dropdown with predefined options.

{
	"name": "priority",
	"label": "Priority",
	"kind": "select",
	"options": ["Low", "Medium", "High", "Critical"]
}

Submitted value: "High"

Checkbox

Boolean toggle.

{ "name": "confirmed", "label": "I confirm the above is correct", "kind": "checkbox" }

Submitted value: true or false

File

File upload with optional restrictions.

{
	"name": "document",
	"label": "Upload Document",
	"kind": "file",
	"accept": "image/*,.pdf",
	"max_file_size": 10485760,
	"max_files": 3
}
PropertyTypeDescription
acceptstringMIME types or extensions (e.g., image/*, .pdf)
max_file_sizenumberMaximum file size in bytes
max_filesnumberMaximum number of files

Submitted value: Array of uploaded file URLs

Signature

Digital signature drawing pad.

{
	"name": "signature",
	"label": "Your Signature",
	"kind": "signature",
	"signature_mode": "draw",
	"pen_color": "#000000"
}
PropertyTypeDescription
signature_modestringDrawing mode: draw
pen_colorstringPen color (hex)

Submitted value: Base64-encoded PNG image data URL

Radio

Radio button group for small option sets (2–4 choices). Clearer and faster to scan than a dropdown.

{
	"name": "priority",
	"label": "Priority Level",
	"kind": "radio",
	"options": ["Low", "Medium", "High"]
}

Uses the same options array as select. Renders as a vertical radio group.

Submitted value: "Medium"

Date

Calendar date picker with optional time input. Opens a popover calendar for date selection.

{ "name": "start_date", "label": "Start Date", "kind": "date" }

With time input:

{ "name": "appointment", "label": "Appointment", "kind": "date", "include_time": true }
PropertyTypeDefaultDescription
include_timebooleanfalseShow a time input alongside the date picker

Submitted value: "2026-03-15" (date only, YYYY-MM-DD) or "2026-03-15T14:30" (with time, YYYY-MM-DDTHH:MM)

Range

Slider input for numeric ranges. Useful for scales, confidence levels, or bounded numeric values.

{
	"name": "confidence",
	"label": "Confidence Level",
	"kind": "range",
	"min": 0,
	"max": 100,
	"step": 5
}
PropertyTypeDefaultDescription
minnumber0Minimum value
maxnumber100Maximum value
stepnumber1Step increment

The current value is displayed alongside the slider.

Submitted value: 75 (number)

Rating

Star rating input. Renders as clickable star icons.

{
	"name": "satisfaction",
	"label": "How satisfied are you?",
	"kind": "rating",
	"max_rating": 5
}
PropertyTypeDefaultDescription
max_ratingnumber5Number of stars (2–10)

Submitted value: 4 (integer, 1 to max_rating)