Form Validation on Submit - InfoPath Dev
in

InfoPath Dev

Form Validation on Submit

Last post 03-02-2010 10:29 AM by mrjustin. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-22-2010 12:12 PM

    Form Validation on Submit

    pretty new to infopath still but this one issue is driving me nuts...

    i have a form with two views (submitter and manager). each has a button to submit that is grayed out until all fields are entered (ie not blank). however, that does not necessarily mean the values in those field are correct -- i could put 99/99/9999 in my date field for example and then continue to try and submit.

    rather than have rules that disables my submit button until all the fields are "not blank", is there  way to have a rule "disable submit until all values are validated" ie no red boxes?

    i've spent hours trying to figure this out on the forums here but still not getting it.

    many thanks in advance.

  • 02-22-2010 01:31 PM In reply to

    Hi Justin,

    If you are using the default submit with InfoPath it will check for valid entries in a date field and should not let a user submit if the data is a schema validation (99/999/9999 will return a validation error).

    I have attached a very simple XSN that if you put in 99/99/9999 in the date field and hit submit you will get a message and you can't submit.

    Does this answer your question?  Seems pretty simple to me, this is all built in InfoPath functionatliy, nothing special.

    A user can SAVE a form with validation errors but by default InfoPath prevents submit.

    Ted

  • 02-22-2010 02:00 PM In reply to

    Re: Form Validation on Submit

    Hi Ted -

    Thanks for your reply! You makea good point about the default submit button...and to answer that I am not.

    When using your example it works fine...but...

    I have custom rules on my Submit button because I am having it change a field. My rules look like this for my Submit button:

    Submit In Progress (rulename):

    Condition: None - Rule runs when button is clicked
    Rule Type: Action
    Run these actions: Set a fields value: Status = "In Progress", Submit using a data connection: SharePoint Library Submit, Close this form: No prompt

    I do this so I can fire off some custom workflow actions. Does that make sense?

     

     

  • 02-22-2010 02:51 PM In reply to

    See the attached modified XSN using the rules to submit, I still can't submit the form until I fix the validation error.

    Unless I am misunderstanding the issue it seems like it sould be working without anything special on your part.

    Ted

  • 03-02-2010 10:29 AM In reply to

    Re: Form Validation on Submit

    Ted -

    Thanks so much for your help. Sorry about my late response. I ended up having a funky issue, there was a conditioning rule in my other view that wasn't showing in all views. Not sure why, beta bug? I'm using InfoPath 2010. After I cleared it out all is working fine. Thank you again.

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