This form uses the Zapatec Transport module to communicate with the server without refreshing the page.
With the Zapatec Transport your form automatically performs both client-side and server-side validation.
Here are the Client/Server rules. Note that this example will only work
on Zapatec web server. You need to put this example on your website
dir where execution of PHP scripts is allowed.
Field is required and the client-side code enforces the data entry.
After the client-side test is passed, the server checks that
the login name is available. In this example, the following names are not available:
"Joe", "Jane", "George", "Judy"(case-sensitive). All other should pass the test.
On success, the form calls a developer-defined function. In this example, an alert reports success.
On failure, the form displays an error message.
After you finish typing login name - browser would check if such login is available.
To control this use the following parameters:
zpFormValidate - url where to send request.
zpFormValidateMethod - which HTTP method to use (GET, POST etc). The default is GET.
zpFormValidateParam - how to name the parameter. The default is the field name.
zpFormValidateQuery - string that will be added to the request query.
Example: class='zpFormValidate="validate.php" zpFormValidateMethod=GET zpFormValidateParam="my_var" zpFormValidateQuery="ajax_check=true"'
will be transformed to validate.php?ajax_check=true&my_var=<CURRENT_FIELD_VALUE>