Buy Now
Sign in

Problem validating 2 fields against each other

momentis , April 26 2021, 11:46
momentis 470
April 26 2021, 11:46 #396301
I have a form which uses fields to validate against each other, ensuring data was entered correctly. For example, there is an Email field and a Retype Email field. Both fields should be the same for the form to submit. When the user is entering data on the form, the error message does not appear when the fields match. However, upon submission, the form is throwing errors indicating that the fields do not match and will therefore not submit.
I have a Validate Fields action placed first in the Submit section, with an Event Loader in the Fail area. However, the form will not submit.
The content here is visible only for authorized users.
What am I doing wrong?
GreyHead 65
April 27 2021, 13:26 #396308
Hi Rick,
The form looks OK at first sight. Please try adding a Debugger action to the On Submit event so that you can see if the two data entries are the same at that point.
Bob
If you'd like to buy me a coffee or two, thank you very much
momentis 470
April 27 2021, 13:48 #396310
Hi Bob!
I put in the Debugger, but it will not display debug info on the front-end. I just keep getting the field errors.
Rick
momentis 470
April 27 2021, 18:50 #396312
I just removed everything from the On Submit event and included only a Debugger action. Doesn't work - just get the field errors.
form-errors.jpg
Attachments
form-errors.jpg
form-errors.jpg
(110.17 KiB)
48 Downloads/Views
momentis 470
April 28 2021, 18:48 #396318
I'm really at a loss on this. Anyone have any ideas??
GreyHead 65
April 29 2021, 13:28 #396323
Hi Rick,
Sorry, it's been a busy week. I'll try to take a look at the form admin later this afternoon.
Bob
If you'd like to buy me a coffee or two, thank you very much
momentis 470
April 29 2021, 14:06 #396324
Same here! And thank you!!
GreyHead 65
April 29 2021, 19:30 #396326
Hi Rick,
I think that this is a CF bug. In the Email Match validation asks for the element ID and you had 'email' in there which was the id. I suspect that this needs the name and not the id so I changed the Email action id from email to nei-email (the same as the name). That seems to have resolved the problem for the email validation. The other Match fields will need changing similarly.
Bob
PS I also fixed a typo in the label for 'Repyte Account'
If you'd like to buy me a coffee or two, thank you very much
momentis 470
April 29 2021, 19:36 #396327
Bob,
Oh geez, I never even thought to try that! Thank you SO much.
Rick