I need send form data via rest api, but fail form.save(), via ajax not is possible, this is the code:
view:“form”,
id:“form_tipos”, url:“rest->url”, save:“rest->url”,
elements:[
{ view:“text”, id:“id”, name:“id”, label:“Id:”, hidden:true},
{ view:“text”, id:“tipo”, name:“tipo”, label:“Tipo:”, placeholder:“Tipo”, required:true},
{ margin:5, cols:[
{ view:“button”, name:“aceptar”, id:“aceptar”, value:“Aceptar” , type:“form”, click:function(){
form = $$(“form_tipos”);
if(form.validate()){
form.save();
}
}}
]}
]
This is the message : form.save is not a function
How can i fix this?