w2form.save

Submits record data to remote data source for saving.
save([postData], [callBack])
postData object, Map of additional parameter to submit to remote data source (optional)
callBack function, call back function when form is reloaded (optional)
Returns undefined.

Description

This method should be called when you need to save the record. Often it is linked to a save button. In the example below when user clicks the save button, it will call the .save() method. This request submits following structure (will be converted to a regular HTTP POST): Please note that the .url property has to be defined for save request to be submitted. If it is not defined, the method will not proceed. The .validate() method is called before form submission. If it return any error the submission will not proceed.

Server Response

If there is no error, the server should return the following JSON: If there are errors, you can send:

User Comments

comments powered by Disqus