Form -> how to submit a From?

How do I submit the Form data?

On http://docs.webix.com/desktop__form_tasks.html one of the examples call “form.save();”, but when I try to use this method, I’m getting an error “form.save is not a function”, which is true, there is no such Form Method.

So, how do I provide URL where to send the request, and what method to call to submit?

You can use

webix.ajax("some.php", form.getValues());

Which will send all data from the form to the some.php script. If you need to send data by post request - it can be done like

webix.ajax().post("some.php", form.getValues());

Tried to test using Form initialization via XML.

Several problems:

  1. If JavaScript code for Button.Click is delivered via XML Element with CDATA (the most reliable way), then Webix does not recognize Button.Click via XML Element.
    http://webix.com/snippet/31a9aa3b

  2. If JavaScript code for Button.Click is delivered via XML attribute (unreliable), then Webix does recognize Button.Click code, but I have to be careful with special characters in code, that can be treated as xml data.
    Tried the generated code on “webix.com/snippet”, the code does not work, the entire form is not rendered:
    http://webix.com/snippet/7c69f375
    If I remove “toolbar” node, including buttons, the code renders fine.

  3. Tried the generated code on my local site with lates Webix codebase from 02.13.2014. The code works, but:

webix.ajax().post(“FormProcessor.ashx”, form.getValues())

does not send any data.
The POST request is empty, no parameters in request.

Any ideas?

Was a regression, just grab the 1.5 package again ( it was patched )

http://webix.com/snippet/cdce8fc8

As for getValues - only inputs with “name” attribute will be included in the post ( similar to normal html form )

thanks