> ## Documentation Index
> Fetch the complete documentation index at: https://docs.confidolegal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Events

Onboarding.js will call the `onChange` handler passed into `renderForm` when certain events happen within the form.

## Event Types

| Type                   | Description                                                                                                                           |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `error_on_file_upload` | There was an error when trying to upload a file.                                                                                      |
| `error_on_load`        | There was an error loading the form.                                                                                                  |
| `error_on_save`        | There was an error while saving the form data.                                                                                        |
| `error_on_submit`      | There was an error trying to submit the form.                                                                                         |
| `loaded`               | The form loaded successfully and is ready for input.                                                                                  |
| `saved`                | All progress has been saved. It would be safe to navigate away from the form.                                                         |
| `submitted`            | All data has been saved and validated. The Firm will now be sent to underwriting.                                                     |
| `token_expired`        | The onboarding token has expired. You must create a new one and re-render.                                                            |
| `token_expires_soon`   | The onboarding token will expire in five or fewer minutes. The user will want to save their progress so they don't lose unsaved data. |

## ChangeEvent

<ParamField body="type" type="string" required>
  The type of event. This can be one of the types listed above.
</ParamField>

<ParamField body="errorMessage" type="string">
  The error message. Only set if this event is an error type.
</ParamField>

<ParamField body="onboardingData" type="object">
  Object containing all the currently saved data in the form. This will not
  include data that has been entered but not saved.
</ParamField>

<ParamField body="tokenExpiresAt" type="string">
  An ISO timestamp of the time at which the token will expire.
</ParamField>
