Hello,
I have a window and I attach a form. In this form I have two fields: email and copyemail, the first I must validate with notempty and the sencond must validate with the same value than email.
I write this:
var ventanaAlta= dhxWins.createWindow(‘ventanaAlta’, 200, 200, 600, 300);
var form_1 = ventanaAlta.attachForm(str);
…
var str = [
{ type:“input” , name:“email”, label:“eMail”, value:"", validate:“ValidEmail”, width:250, labelWidth:“250”, labelHeight:“21”, inputWidth:“250”, inputHeight:“21”, labelLeft:“15”, labelTop:“90”, inputLeft:“15”, inputTop:“111”, position:“absolute” },
{ type:“input” , name:“copyemail”, label:“Confirmaciòn”, value:"", validate:“vCopyeMail”, width:250, labelWidth:“250”, labelHeight:“21”, inputWidth:“250”, inputHeight:“21”, labelLeft:“290”, labelTop:“90”, inputLeft:“290”, inputTop:“111”, position:“absolute” }
…
function vCopyeMail(data){
var v = form_1.getItemValue("email");
var v2 = form_1.getItemValue("copyemail");
return (v == v2);
};
…
All the time don’t match, validate is false.
Can you say me the error?
thanks a lot!