---
title: onTextChange
framework: tvmljs
role: symbol
role_heading: Instance Property
path: tvmljs/keyboard/1627355-ontextchange
---

# onTextChange

A function the system calls when the text in a search or text field changes.

## Declaration

```data
attribute function onTextChange;
```

## Discussion

Discussion Provide a callback function for the onTextChange attribute to respond to changes in the searchField or textField elements. You can respond to user inputs as the changes happen. This attribute must be set to a function; for example, Keyboard.onTextChange = function () {}.

## See Also

### Setting and Retrieving Text

- [text](tvmljs/keyboard/1627359-text.md)
