Error messages when SUBMIT without required fields - InfoPath - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Error messages when SUBMIT without required fields - InfoPath

Last post 08-11-2020 08:43 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-02-2020 02:56 PM

    Error messages when SUBMIT without required fields - InfoPath

     Form Validation Messaging

    Can someone please help me design a clean way to show error messages when the User click on "Submit" button without filling in all the required fields.

    I have an InfoPath form now with a number of required fields. If a User click Submit without filling in the requried fields, I like to display an error message either right next to the required field or somewhere on the form or as a pop-up message.

     But if they have filled in all the required fields, then the Submit button has a bunch of actions that it will complete. So the above step should also prevent those Actions from taking place as well.

     If someone has an example file that can be shared here, that would be greatly appreciated. 

    Thank you.
  • 08-06-2020 06:48 PM In reply to

    Re: Error messages when SUBMIT without required fields - InfoPath

    Unfortunately, without using code, you'll need to use specific rules for this on your submit rules. So, you could have in your main data source an "error" field, and if a field is missing data, add to the error message field and display that on your form. I'm attaching a simple sample of what I'd do. Save it locally by right clicking the link and using the save option in your browser, then right click the saved file, select Design and you can preview from there.
    Hilary Stoupa

  • 08-06-2020 07:02 PM In reply to

    Re: Error messages when SUBMIT without required fields - InfoPath

     Wow.. that's beautiful. That's a neat trick. I can implement that. :-)

    I have quite a few fields. So is there anyway to add CRLF to the text so that it will appear as:

    field1 can't be blank
    field2 can't be blank
    field3 can't be blank

    And then (I am being greedy), I am assuming that doing a If-else, do-while loop kind of programming to go through all fields and create that message would not be possible. Just curious. 

  • 08-06-2020 07:12 PM In reply to

    Re: Error messages when SUBMIT without required fields - InfoPath

    So - this link will help you with your line break: https://docs.microsoft.com/en-us/archive/blogs/infopath/inserting-line-breaks-into-text-using-rules

    As to a loop - no such luck without code. :) 

    Hilary Stoupa

  • 08-06-2020 08:35 PM In reply to

    Re: Error messages when SUBMIT without required fields - InfoPath

    Okay. thank you for your support Hillary .

    I have seen the solution at the link you provided for CRLF. But the problem is that it has to GET data/file from the server. Within our organization, the SharePoint is fairly restrictive and as such I cannot guarantee that the read/get from server always happens. So that solution, while elegant, probably will be bit risky in our network.

    But thatst okay I will just keep it simple.

    Thanks for your time. 

  • 08-11-2020 08:43 AM In reply to

    Re: Error messages when SUBMIT without required fields - InfoPath

    No. It doesn't. You can include the XML as a resource file in the template which doesn't require queries?
    Hilary Stoupa

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.