Here is complete (non-working) code
[code]SignupForm = Signup.attachForm();
formData = [
{“type”:“settings”,“position”:“label-top”,“labelAlign”:“left”},
{“type”:“block”,“width”:200,“blockOffset”:10,“list”:[
{“type”: “input”, “name”:“user_name”, “label”: “First and Lastname”,“required”:true,“inputWidth”:190},
{“type”: “input”, “name”: “user_mail”, “label”: “E-mail”,“required”:true,“inputWidth”:190},
{“type”: “input”, “name”: “user_cell”, “label”: “Cell Phone”,“required”:true,“inputWidth”:190},
{“type”: “password”, “name”: “user_pass”, “label”: “Password”,“required”:true,“inputWidth”:190},
{“type”:“button”,“name”:“send”,“value”:“Create Account”}
]
}
];
SignupForm.loadStruct(formData,“json”,function(){ Signup.progressOff(); });
SignupForm.setItemFocus(‘user_name’);
SignupForm.attachEvent(“onButtonClick”,function(id)
{
Signup.progressOn();
SignupForm.send("/api/signup/save", function(loader, response)
{
Signup.progressOff();
json_res = JSON.parse(response);
if(json_res['status']=='ERROR')
dhtmlx.alert({ title:"Error!!!",type:"alert-error",text:json_res['error_message'] });
else if(json_res['status']=='OK')
dhtmlx.message({text: "Account created" });
});
});
[/code]