How can one collect data from a page prior to submit?