required field when checked - InfoPath Dev
in

InfoPath Dev

required field when checked

Last post 09-11-2014 08:09 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-10-2014 11:07 AM

    required field when checked

    I have a form working off sharepoint 2010 (i am using office 2010 as well).  I have a section of the form that is only visible when you select check box "yes".  I would like the fields that reside in this conditional section to be REQUIRED when that same check box = "yes" as my users are checking "yes", but then failing to fill in the additional data so that we can fulfill there request.  Believe I can do this with rules, I just haven't figured out what the rules need to say.  Assume first part of rule is "when field 1 = yes", but i dont see where i can then follow on and add that "field 2 cannot be blank" of "is required".  Appreciate any assistance you can offer.
    Filed under:
  • 09-10-2014 11:21 AM In reply to

    Re: required field when checked

    Add validation rules to each field. The conditions on the rules would be:

    Checkbox = 'yes' (make sure that is the actual value for your checkbox control when selected)
    and
    field is blank (with field being the field you have the validation rule on)

    Hilary Stoupa

  • 09-10-2014 12:09 PM In reply to

    Re: required field when checked

    Thanks Hilary, did you mean "field is NOT blank"?  I tried this, but it didn't keep me from submitting a test submission without data in the field that SHOULD have been a "required" field by the rule.  Was hopeing it would stop the user from submitting if the field was blank.

  • 09-10-2014 12:22 PM In reply to

    I meant is blank - attaching a sample, take a look at the rule on field2. Save the template locally, right click and select design to open in design mode.

    Hilary Stoupa

  • 09-10-2014 02:10 PM In reply to

    Re: required field when checked

    Getting closer.  So i see we ARE using "is Blank"  - the validation is based on the negative, so IF it is Blank, then you get the message.  I did this on my form, and it actually shows an Asterick (required field) now in the "field 2" when "field 1" = yes.  And it wont let me submit the form if i dont put data in the field 2, which is just what i want.  My issue now is that the message isnt working like yours is.  I get a generic validation message when i click submit, that says "Some rule were not applied" vs the message i put in the Screen Tip "You must fill in the additional required information about the products you require."  Works all the same.  Really appreciate the support.  Have an additional question on selection of an item from a list will drive the choices on a second list.  Have you already written the how to on this topic?
  • 09-10-2014 02:34 PM In reply to

    Re: required field when checked

    The hard part about your second question is when you don't know what to search for. :) I struggled with that when I first started with IP. You are looking for info on setting up cascading drop downs - Here's an Office Online how to:http://office.microsoft.com/en-us/infopath-help/create-a-cascading-list-box-HA001117713.aspx

    It is for IP 2003, but should still get you pointed in the right direction.

    The validation message you get on submit is normal. Is this a brower form or a filler form? If filler, you can have it give a popup when the validation rule fires....

    Hilary Stoupa

  • 09-11-2014 06:31 AM In reply to

    Re: required field when checked

    not sure if its browser or form filler.  Access to the site via the browser, but when you click add new or edit existing, it pops the form up - i dont really know if its that instance is browser or filler - i would assume filler.  I put the same message in the Screen Tip and the Dialog box, and select "show screentip and dialiog box message" on the bottom of the options section of the rule.  Appreciate your help.  Will try to make the dependant list thing work.

  • 09-11-2014 08:09 AM In reply to

    Re: required field when checked

    Based on what you are saying, this is a SharePoint List form - so it is a browser form and dialog box messages won't display in the browser.

    You could also add a calculated value that hides if Checkbox is No or if Checkbox is Yes and Field 2 is not blank - the calculated value could say "Please fill in the field" or whatever.

    Hilary Stoupa

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