Add function for pulling data from form