Comparing text fields for validation


on form, have 2 text fields, password , confirmpassword. @ validation, compare these 2 make sure match, , if dont, fail validation , not submit form. had assumed returning false on validate take care of this. in advance.

if forms have buttons(print,submit or email), best place put "if" statement on these buttons. "if" statement make sure values 2 fields same.

if forms don't have buttons, "if" statement can put on "exit" event of confirmpassword field.

below example of simple if statement.

if (textfield1.rawvalue != textfield2.rawvalue)
{
app.alert("your passwords entered not same.");
}


More discussions in LiveCycle pre-ES (6.x and 7.x) discussions


adobe

Comments