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> | Yes | The validation errors for 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 form: $ref: Form.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 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 - form - response - status - validationErrors - createdAt - lastModifiedAtdescription: The base model for a form response$defs: RecordUnknown: type: object properties: {} unevaluatedProperties: {}
The TypeSpec code for this model.
/** The base model for a form response */model FormResponseBase { /** The unique identifier for the form response */ id: Types.uuid;
/** The form being responded to */ form: Form;
/** 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>;
/** 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 customValue: type: string description: A custom value for the status description: type: string description: A description of the statusrequired: - valueexamples: - 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)model FormResponseStatus { /** The status of the form response */ value: FormResponseStatusOptions;
/** A custom value for the status */ customValue?: string;
/** A 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 options for the status of the form response
The TypeSpec code for this model.
/** The options for the status of the form response */enum FormResponseStatusOptions { /** The form response has not been started */ notStarted,
/** The form response is in progress */ inProgress,
/** The form response is submitted */ complete,}