A function is triggered when the button is clicked.
The function copies the text from Field1 into Field2.