Skip to main content
Form & Survey methods for published sites. Requires the Form & Survey feature (form_and_survey). Identify forms by their key (for example contact or newsletter) — the same key shown in the dashboard.

getFormSchema(formKey) / getForm(formKey)

Load the form name, field schema, and settings. getFormSchema and getForm are aliases.
Returns:
Build the UI from schema. Field id values are the keys you pass to submitForm.

Field types

validation may include minLength, maxLength, min, max, pattern, and options ({ value, label }[]) for select-style fields.

submitForm(formKey, data)

Submit a response. Keys in data must match field ids from the schema.
Rejects when the form is closed, over maxSubmissions, fails validation, or violates a unique-field constraint (HTTP 409).

getFormSubmissions(formKey, options?)

List submissions. Requires public submissions listing enabled on the form (settings.publicSubmissionsListing). Otherwise the API returns 403.
dataJson keys are field ids; values match the field types above.

getFormSubmissionById(formKey, submissionId)

Fetch one submission. Also requires public submissions listing.

Example — load and submit

User guide

Non-technical setup: Forms & surveys