When the button is clicked, trigger serverside with the data from those text fields and use either the
echo(message) or
sendToRC(message) command to output to RC.
You can read more about serverside, clientside, and triggers
here.
You can find a simple example of responding to clicks on GUI buttons
here.