.uiForm()
Categories: UI
.uiForm( [ options ] )
Subclass: ep
Plugin: ep.ui.form
Description: Advanced form handling.
-
.uiForm( [ options ] )
version added: 6.11.0options A map of additional options pass to the method.
The .uiForm()
method add advanced form handling, like ajax or validate, to a form.
Default handling:
- prevent submit if no action attribute givn
- prevent submit if an element of the form invalid
-
Apply .uiForm() to all forms and set an ajax handle for submit.
Code:
ep('form') .uiForm({ ajax: { success: function( successText ){ alert( successText ); }, error: function( errorText ){ alert( errorText ); } } });
-
isValid
-
.uiForm( 'isValid' )
version added: 6.11.0
Get a boolean indication wether the elements of the form are valid.
-
-
setValid
-
.uiForm( 'isValid', valid )
version added: 6.11.0valid A boolean indication whether to set the valid state of the form.
Set the validity state of the form to
true
(valid) orfalse
(invalid). -