Skip to content
Get in touch

Form

A form for collecting data from a user.

PropertyTypeRequiredDescription
iduuidYesThe form’s unique identifier
namestringYesThe form’s name
descriptionstringNoThe form’s description
instructionsstring | FileNoThe form’s instructions
jsonSchemaFormJsonSchemaNoThe form’s JSON schema used to render the form and validate responses
uiSchemaFormUISchemaNoThe form’s UI schema used to render the form in the browser
mappingToCommonGrantsMappingSchemaNoA mapping from form schema to CommonGrants schema
mappingFromCommonGrantsMappingSchemaNoA mapping from CommonGrants schema to form schema
customFieldsRecord<CustomField>NoCustom attributes about the form itself, not custom fields within the form

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": { "field": "name.first" },
"lastName": { "field": "name.last" }
},
"emails": { "primary": { "field": "email" } },
"phones": { "primary": { "field": "phone" } }
},
"mappingFromCommonGrants": {
"name": {
"first": { "field": "name.firstName" },
"last": { "field": "name.lastName" }
},
"email": { "field": "emails.primary" },
"phone": { "field": "phones.primary" }
},
"customFields": {
"formType": {
"name": "Form Type",
"fieldType": "string",
"value": "application",
"description": "The type of form"
}
}
}

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" }
}
}

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" }
]
}