Skip to content

Form

A form for collecting data from a user.

PropertyTypeRequiredDescription
id uuid Yes The form's unique identifier.
name string Yes The form's name.
description string No The form's description.
version string No
instructions string or array<File> No The form's instructions.
jsonSchema FormJsonSchema No The form's JSON schema used to render the form and validate responses.
uiSchema FormUISchema No The form's UI schema used to render the form in the browser.
mappingToCommonGrants MappingSchema No A mapping from form schema to CommonGrants schema.
mappingFromCommonGrants MappingSchema No A mapping from CommonGrants schema to form schema.
customFields record<CustomField> No Custom attributes about the form itself, not custom fields within the form.
createdAt utcDateTime Yes The timestamp (in UTC) at which the record was created.
lastModifiedAt utcDateTime Yes The timestamp (in UTC) at which the record was last modified.

A JSON example of this model.

{
"id": "b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a",
"name": "Form A",
"description": "Form A description",
"instructions": "Form A instructions",
"jsonSchema": {
"$id": "formA.json",
"type": "object",
"properties": {
"name": {
"first": {
"type": "string"
},
"last": {
"type": "string"
}
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"uiSchema": {
"type": "VerticalLayout",
"elements": [
{
"type": "Group",
"label": "Name",
"elements": [
{
"type": "Control",
"scope": "#/properties/name/first"
},
{
"type": "Control",
"scope": "#/properties/name/last"
}
]
},
{
"type": "Control",
"scope": "#/properties/email"
},
{
"type": "Control",
"scope": "#/properties/phone"
}
]
},
"mappingToCommonGrants": {
"name": {
"firstName": {},
"lastName": {}
},
"emails": {
"primary": {}
},
"phones": {
"primary": {}
}
},
"mappingFromCommonGrants": {
"name": {
"first": {},
"last": {}
},
"email": {},
"phone": {}
},
"createdAt": "2025-01-01T17:01:01.000Z",
"lastModifiedAt": "2025-01-02T17:30:00.000Z"
}
Version Changes
0.3.0
  • Renamed model from Form to FormBase
  • Added version field
0.2.0
  • Added Form model

A JSON schema used to validate form responses.

A JSON example of this model.

{
"$id": "formA.json",
"type": "object",
"properties": {
"name": {
"first": { "type": "string" },
"last": { "type": "string" }
},
"email": { "type": "string" },
"phone": { "type": "string" }
}
}
Version Changes
0.2.0
  • Added FormJsonSchema model

A UI schema used to render the form in the browser.

A JSON example of this model.

{
"type": "VerticalLayout",
"elements": [
{
"type": "Group",
"label": "Name",
"elements": [
{ "type": "Control", "scope": "#/properties/name/first" },
{ "type": "Control", "scope": "#/properties/name/last" }
]
},
{ "type": "Control", "scope": "#/properties/email" },
{ "type": "Control", "scope": "#/properties/phone" }
]
}
Version Changes
0.2.0
  • Added FormUISchema model