jQuery EasyUI Form β Create Asynchronous Submit Form
This tutorial shows you how to submit a form using EasyUI. We create a form with name, email, and phone fields. By using the EasyUI form plugin, we convert the form into an Ajax form. The form submits all fields to the backend server, which processes them and sends some data back to the frontend page. We receive the returned data and display it.
Create Form
Ajax Form
| Name: | |
| Email: | |
| Phone: | |
Convert to Ajax Form
$('#ff').form({
success:function(data){
$.messager.alert('Info', data, 'info');
}
});
Server-Side Code
form1_proc.php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
echo "Your Name: $name
Your Email: $email
Your Phone: $phone";
Download jQuery EasyUI Example
YouTip