added ability to capture the text that the user is trying to submit