none
Customising the Error Validtion Pop-Up in an InfoPath Form

    Question

  • I have a InfoPath form which works fine when all the fields are completed, the problem I have is when the close button is clicked.

    I'm basically trying to check for when the user decides he doesn't need to add any item  and also when the user decides to close out of the form.

    And also when the user clicks the submit button and there is not required data filled in.

    Problem I have with these two is that I get a pop-up message for the close button I get:

    "The data on this form might have changed. Are you sure you want to close this form?"

    Click Submit button with Empty Form:
    "InfoPath cannot submit the form because it contains errors. Errors are marked with either a red asterisk(required fields) or, dashed border(invalid values)"

    Is there a way to hide these pop-up messages, or customise them to be more descriptive about which field is empty or a generic pop that says (Enter Required Field)

    Friday, February 17, 2017 1:00 PM

All replies

  • Hi,

    If you open InfoPath form and change values, the message will pop up when you click Close button. This behavior works as expected, which is hard coded by design and it’s difficult to modify the code to achieve your requirement.

    “Click Submit button with Empty Form”:

    Why do you want to submit empty data? Required files will be marked with a red asterisk and invalid values will be marked with dashed border in the InfoPath form. So it’s no needed to show fields in error message dialog.

    If you want to customize it, you need to create a custom solution: http://blog.parkercomp.com/2009/05/how-to-customize-infopath-error-dialogs.html#!/2009/05/how-to-customize-infopath-error-dialogs.html

    Best Regards,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, February 20, 2017 6:46 AM
    Moderator
  • Hi,
    Is there any update?
    If my reply is helpful to you, you can mark as answer.
    Thanks,
    Dean Wang

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, February 27, 2017 1:38 PM
    Moderator