Get ready for BLACK FRIDAY shopping starting in

App Connect Form Validator Support Product Page

Form validator checking checking value despite condition not being true

Reported 05 Jul 2018 16:01:46
1
has this problem
05 Jul 2018 16:01:46 Lee Woolsey posted:
I have a form that I use for both new accounts and updating existing accounts. There are two fields I need to check for existing records in the database (a username field and an email field.)

The form has an "account_new" and "account" field, and an "email_new" and "email" field. The account and email fields are populated with existing data. The fields are displayed depending on the value of a hidden "isNew" field. All of this work properly.

In the Server Connect action file, the script checks the status of the isNew field, then either performs an update or insert operation. As part of the insert operation, I use Form Validator to check the database to see if the values of account_new and email_new already exist in the database, if they do, the appropriate errors are displayed. This also works as expected.

The problem I am encountering is that my fields account and email (that contain bound data from the database) are also getting flagged by the validator, despite the fact that the (1)fields have different names and (2) the validator commands are contained within a different branch of the then/else structure.

What might be causing this?

Reply to this topic