Form Response
FormResponseBase
Section titled “FormResponseBase”Base model for a form response.
Property | Type | Required | Description |
---|---|---|---|
id | uuid | Yes | The form’s unique identifier. |
form | Form | Yes | The form being responded to. |
response | Record<unknown> | Yes | The response to the form. |
status | FormResponseStatus | Yes | The status of the form response. |
validationErrors | Array<unknown> | No | The validation errors for the form response. |
customFields | Record<CustomField> | No | The custom fields about the form response. |
createdAt | utcDateTime | Yes | The form’s creation date. |
lastModifiedAt | utcDateTime | Yes | The form’s last modified date. |
Formats
Section titled “Formats”A JSON example of this model.
{ "id": "083b4567-e89d-42c8-a439-6c1234567890", "form": { "id": "b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a", "name": "Form A", "description": "Form A description" }, "response": { "name": { "first": "John", "last": "Doe" }, "email": "john.doe@example.com", "phone": "555-123-4567" }, "status": { "value": "complete", "description": "The form response is complete" }, "validationErrors": [], "createdAt": "2024-01-01T00:00:00Z", "lastModifiedAt": "2024-01-01T00:00:00Z"}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: FormResponseBase.yamltype: objectproperties: id: $ref: uuid.yaml description: The unique identifier for the form response formId: $ref: uuid.yaml description: The form being responded to response: $ref: "#/$defs/RecordUnknown" description: The response to the form status: $ref: FormResponseStatus.yaml description: The status of the form response validationErrors: type: array items: {} description: The validation errors for the form response customFields: $ref: "#/$defs/RecordCustomField" description: Custom attributes about the form response createdAt: type: string format: date-time description: The timestamp (in UTC) at which the record was created. lastModifiedAt: type: string format: date-time description: The timestamp (in UTC) at which the record was last modified.required: - id - formId - response - status - createdAt - lastModifiedAtunevaluatedProperties: not: {}examples: - id: 123e4567-e89b-12d3-a456-426614174000 formId: 123e4567-e89b-12d3-a456-426614174000 response: firstName: John lastName: Doe email: john.doe@example.com phone: 123-456-7890 address: street: 123 Main St city: Anytown state: CA zip: "12345" country: null status: value: inProgress description: The form response is in progress validationErrors: - field: address.country message: Country is required createdAt: 2021-01-01T00:00:00Z lastModifiedAt: 2021-01-01T00:00:00Zdescription: The base model for a form response$defs: RecordUnknown: type: object properties: {} unevaluatedProperties: {} RecordCustomField: type: object properties: {} unevaluatedProperties: $ref: CustomField.yaml
The TypeSpec code for this model.
/** The base model for a form response */@example(Examples.FormResponse.formResponse)@Versioning.added(CommonGrants.Versions.v0_2)model FormResponseBase { /** The unique identifier for the form response */ id: Types.uuid;
/** The form being responded to */ formId: Types.uuid;
/** The response to the form */ response: Record<unknown>;
/** The status of the form response */ status: FormResponseStatus;
/** The validation errors for the form response */ validationErrors?: Array<unknown>;
/** Custom attributes about the form response */ customFields?: Record<Fields.CustomField>;
/** The system metadata for the form response */ ...Fields.SystemMetadata;}
FormResponseStatus
Section titled “FormResponseStatus”The status of a form response.
Property | Type | Required | Description |
---|---|---|---|
value | FormResponseStatusOptions | Yes | The form’s status. |
customValue | string | No | A custom value for the status. |
description | string | No | A description of the status. |
Formats
Section titled “Formats”A JSON example of this model.
{ "value": "complete", "description": "The form response is complete"}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: FormResponseStatus.yamltype: objectproperties: value: $ref: FormResponseStatusOptions.yaml description: The status of the form response, from a predefined set of options customValue: type: string description: A custom value for the status description: type: string description: A human-readable description of the statusrequired: - valueunevaluatedProperties: not: {}examples: - value: inProgress description: The form response is in progressdescription: The status of the form response
The TypeSpec code for this model.
/** The status of the form response */@example(Examples.FormResponse.inProgressStatus)@Versioning.added(CommonGrants.Versions.v0_2)model FormResponseStatus { /** The status of the form response, from a predefined set of options */ value: FormResponseStatusOptions;
/** A custom value for the status */ customValue?: string;
/** A human-readable description of the status */ description?: string;}
FormResponseStatusOptions
Section titled “FormResponseStatusOptions”The options for the status of a form response.
Options
Section titled “Options”Value | Description |
---|---|
notStarted | The form response has not been started |
inProgress | The form response is in progress |
complete | The form response is complete |
custom | A custom status |
Formats
Section titled “Formats”A JSON example of this model.
"inProgress"
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: FormResponseStatusOptions.yamltype: stringenum: - notStarted - inProgress - completedescription: |- The set of values accepted for form response status: - `notStarted`: The form response has not been started - `inProgress`: The form response is in progress - `complete`: The form response is complete, meaning all required fields have been filled out and there are no validation errors - `custom`: A custom status
The TypeSpec code for this model.
/** The set of values accepted for form response status: * - `notStarted`: The form response has not been started * - `inProgress`: The form response is in progress * - `complete`: The form response is complete, meaning all required fields have been filled out and there are no validation errors * - `custom`: A custom status */@Versioning.added(CommonGrants.Versions.v0_2)enum FormResponseStatusOptions { notStarted, inProgress, complete,}