Adds ajax calls for form submission