I am trying to validate a form when a user clicks on the Submit button. I studied this post http://www.infopathdev.com/forums/thread/11721.aspx but the script did not work for me. Let me first explain the Rules that run when a user clicks on the Submit button.
My Rules run as follows on Submit:
- Change a boolean expression box to True from False. Once this expression box reflects True then the section containing the Submit button is hidden so that it is no longer visible within the submitted form and email attachment to prevent users from "accidently" re-submitting when reviewing the attachment in email.
- Submit form to SharePoint library. This library is used to keep a copy of submitted forms as a back up strategy in case emails are lost. (autosave is deselected as a form option so that incomplete or manually closed forms are not saved to the library)
- Submit form to email.
- Close form.
The difficulty I am having is that when a user clicks on the Submit button and there are validation errors he/she receives two messages depending on the action taken, but for whatever reason the users are ignoring or not reading the error messages and just closing the form manually;
- Some rules were not applied if the user opens the dialoge box then it tells them there are validation errors, but when a user clicks on OK then the dialoge box goes away as designed. At this point the first Rule I have above now hides the section containing the Submit button since it was already clicked by the user.
- If the user then tries to re-submit using the Submit button on the toolbar he/she is given the following error message, InfoPath cannot submit the form becuase it contains validation errors. Errors are marked with either a red asterisk (required fields) or a red, dashed border (invalid values).
When the user ignores these messages and closes the form manually then nothing is submitted, but they think a request has been submitted and they ask why no email has shown up...."There must be an issue with the request form becuase the email request was never received." **I roll my eyes**
Any ideas on how to "outsmart" the users and force them to submit a completed form or if they manually close the form give them a dialoge box message telling them that nothing has been submitted? I thought I had my bases covered her, but I guess not. Some ideas would be welcome.
Maybe I just need smarter users *lol* Quite frustrating really.