jQuery EasyUI Form - Creating an Asynchronous Submit Form
This tutorial shows you how to submit a form with easyui. We create a form with name, email, and phone fields. By using the easyui form plugin, we turn the form into an ajax form. The form submits all fields to the backend server; the server processes them and sends some data back to the front-end page. We receive the returned data and display it.
Creating the Form
Ajax Form
Turning it into an 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";