Added functions to create a form and send it to the view, also added code to handle the post