Added form validation and the creation of the requests needed to process the form