# Timer

The optional `timer` object adds a countdown or count-up timer to the form. When time expires, a custom message and button are shown.

Not every form has a timer. It only appears when added as a form field in the builder.

## Schema

| Field | Type | Description |
|  --- | --- | --- |
| `isEnabled` | boolean | Enable the timer |
| `seconds` | number | Total duration in seconds |
| `hoursText` | string | Label for the hours display |
| `minutesText` | string | Label for the minutes display |
| `secondsText` | string | Label for the seconds display |
| `isCountUp` | boolean | Count up instead of down |
| `timeExpiredMessage` | string | Message shown when time runs out |
| `timeExpiredButton` | string | Button label when time runs out |
| `timeExpiredTitle` | string | Title shown when time runs out |
| `timeExpiredMessageWithInvalidForm` | string | Message when time runs out but required fields are incomplete |
| `timeExpiredButtonWithInvalidForm` | string | Button label for the incomplete-form state |


```json
"timer": {
  "isEnabled": true,
  "seconds": 5445,
  "hoursText": "Hours",
  "minutesText": "Minutes",
  "secondsText": "Seconds",
  "isCountUp": false,
  "timeExpiredMessage": "Please submit your answers",
  "timeExpiredButton": "Submit",
  "timeExpiredTitle": "Time's up!",
  "timeExpiredMessageWithInvalidForm": "You need to answer all the required questions to submit your response.",
  "timeExpiredButtonWithInvalidForm": "Start over"
}
```