w2form.url

URL to the remote data source.
String or Object, default = ''
If the .url property is defined and .recid property is not 0, the form will attempt to load record data from the remote data source. The data will be loaded into the .record object and a copy into .original object.
You can defined URL as a string: Or you can defined different URL for retrieving and saving the record: You can change this property during run-time

JSON Structures

If the .recid property is not set, no request will be made. Otherwise, the form will submit the following JSON structure; Plus any additional parameters you specified in .postData object. The form will expect back a JSON structure in the following format: where field1 should match the names in .fields property.
If you want to return an error, you can return it in the following format: If you call the .save() method the form will submit the following JSON structure:

User Comments

comments powered by Disqus