Connect the text field with the function.