Category

HTML

Category

I’ve clearly explained about jquery ajax from submissions and html5 validation before. Here I am just extending it a little bit. What if the scenario include multiple forms and it should use the same jquery ajax submission part. Its totally awkward using separate jquery ajax submit for different forms, as basically the jquery submit part is standard for all forms (as we are passing the form data through jquery serialize ).

multiple forms with jquery ajax and HTML5 validation Code


Name:
Email:
Name:
Message:

DEMO

DOWNLOAD SOURCE

Jquery ajax as well as html 5 validations are one of the most important features of web development. Both of them makes the tasks of developers so damn easy. Some of you might ran into issues while using both of them simultaneously , especially with jquery click for triggering the form(the validation may freak out if we use click).  Actually the solution is simple, we just need to use the jquery submit so that the ajax will get triggered only after successful form validation. The form gets submitted via ajax to contact.php and success and errors are handled inside the jquery ajax. The form is set up in html 5, and the validations will be in action on form submit.




Name:

Email:


If you don’t know much about about jquery ajax form submissions ,have look at this clean tutorial about Jquery ajax -php and form submissions

Demo

Download Source