Validation rule - InfoPath Dev
in

InfoPath Dev

Validation rule

Last post 08-12-2013 07:04 AM by Newbie 2013. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-07-2013 07:59 AM

    Validation rule

    Hi everybody,

    I am quite new at this and need to understand how I can use validation rules on custom submit buttons (created on form) so that the user gets a similiar message when the form is incorrectly filled out. As an example when using the default Form button - "The form cannot be submitted because of an error". Any information would be greatly appreciated!

    Sorry forgot to include:

    Using InfoPath 2010 and SharePoint 2010 on a web based Infopath form.

    I am also making the Submit do the following:

    1) Make button "hidden" after 1st submit

    2) Add document name to field "document field"

    3) Submit

    So when the user clicks for the first time the submit button hides, wheither the form is filled out correctly or not. Then a "Save" button appears and when user selects "Save" it switches to another view showing the document was saved correctly.

    Thanks for any assistance.

  • 08-11-2013 12:55 PM In reply to

    Hi Newbie 2013 and welcome to InfoPath!

    Browser forms don't support popup alerts. So, you have to do it in your form.

    So, the submit button is not a good place to put validation since there is no way to alert the user.

    Rather, I suggest adding a formatting rule to your Submit button that disables it if the condition which you are validating is not met.

    In addition, I would add an optional section to your view near the Submit button that has text in it.

    For example, you could simply display: "Invalid input, please check your form fields" but you probably want to be more specific based on your validation criteria.

    This section has a formatting rule that hides it if the validation criteria are met (opposite of formatting rule for button).

    This way, the user can see that the form is invalid and why when they attempt to submit and you disable submit button anyway, so they don't take the needless action.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 08-12-2013 07:04 AM In reply to

    Thanks Patrick. That was good information and will consider for my next form.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.