Adding a variable to track changes in the text field