Expand my Community achievements bar.

Validation Question - Why is form displaying error message for Required Field?

Avatar

Level 1

Hi, I am new to Livecycle Designer ES3 and would really appreciate assistance with a validation issue on our first form. We are using Reader Extended forms with Workbench to validate data entered with a backend database. Our validations are a combination of javascript on functions and built-in validations.

Everything is working except for an Email field (optional field) followed by a Confirm Email field (optional dependant field on whether email field is entered) followed by an Occupancy field which is a  group radio button (required field). When the Confirm Email field does not match the Email field an error message box is displayed and you have to click Ok. This part is working fine. However after clicking Ok an error message saying Occupancy is required (the next field) is also displayed. The Confirm Email field is validated with javascript on the Exit function. It tests and shows the message properly and also sets focus to return the cursor to the confirm email field. The Occupancy required field is validated using the built-in validation.

How can I stop the "Occupancy is required" built-in validation message from displaying at this time. I want it to display if they have tabbed or clicked past this field upon submission (which it does) but at this point they haven't gotten to fill this field in yet so why is it being displayed? It almost seems like after exiting the Confirm Email field it runs the Exit script, which moves the cursor back to Confirm Email for them to correct but by clicking the Ok button in that error message Livecycle thinks it is moving out of the Occupancy field and no radio button was selected so it gives you the "is required" error. If the Confirm Email field is empty vs filled in but incorrect you get different results. So if you tab over the Confirm Email field and it is empty but the Email field was filled in you get the javascript error message, you click ok and you get the next field mandatory error message. If you then type in one letter into the Confirm Email field you get the javascript error message but you don't get the next field mandatory error message however if you simply press tab again it toggles back to showing both error messages. Help!

When you have this scenario of javascript validation followed by a built-in mandatory field do you need to take out the built-in validation and set the mandatory field on a Presubmit function?

Thanks for any assistance you can provide, Kathie 

0 Replies