To make the form become ajax submit form
To do a submit action
Name | Type | Description | Default |
---|---|---|---|
url | string | The form action URL to submit | null |
Name | Parameters | Description |
---|---|---|
onSubmit | none | Fires before submit, return false to prevent submit action. |
success | data | Fires when the form is submitted successfuly. |
onBeforeLoad | param | Fires before a request is made to load data. Return false to cancel this action. |
onLoadSuccess | data | Fires when the form data is loaded. |
onLoadError | none | Fires when some errors occur while loading form data. |
Name | Parameter | Description |
---|---|---|
submit | options | Do the submit action, the options parameter is a object which contains following properties: url: the action URL onSubmit: callback function before submit success: callback function after submit successfuly |
load | data | Load records to fill the form. The data parameter can be a string or a object type, when string acts as a remote URL, otherwise acts as a local record |
clear | none | Clear the form data |
validate | none | Do the form fields validation, return true when all fields is valid. The method is used with the validatebox plugin. |