updates text input field