---
updatedAt: 2026-05-07T18:17:26.000Z
agentTools:
  projectIndex: https://docs.joinforage.app/llms.txt
---

# change

Emitted when an [`EBT Element`](https://docs.joinforage.app/reference/ebt-elements)'s value changes.

The `change` [`EBT Element` event object](https://docs.joinforage.app/reference/events#the-ebt-element-event-object) contains an additional `complete` field. The `complete` value is a boolean that indicates whether the EBT element contains a valid input.

```javascript Example change event object
{
  type: 'change',
  usecase: 'collect_pin',
  complete: true,
  error: null
}
```

## Listen for `error`

Listen for an `error` value on the `change` event object to display input validation errors to the user.

### Example

#### Display a message if there's an `event.error` on `change`

```javascript
balanceElement.on('change', (event) => {
  const explainErrorSpan = document.getElementById('explain-error')
  if (event.error) {
    // show validation error to customer
    explainErrorSpan.textContent = event.error.message
  } else {
    // hide validation error
    explainErrorSpan.textContent = ''
  }
})
```

## Listen for `complete`

Listen for the complete value on the `change` event object to change the UI when an input value is ready to submit.

### Example

#### Enable a submit button if `event.complete` on `change` is true

```javascript
balanceElement.on('change', (event) => {
  const submitBalanceCheckBtn = document.getElementById('submit-balance-btn')
  if (event.complete) {
    // enable submit button
    setDisabled(false)
  }
});
```

# Sibling pages

* [ready](https://docs.joinforage.app/reference/ready.md)