At least one check box required - InfoPath Dev
in

InfoPath Dev

At least one check box required

Last post 12-08-2008 06:13 AM by Frederik Van Lierde. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-25-2008 09:58 AM

    • Steph
    • Not Ranked
    • Joined on 11-25-2008
    • Posts 4

    At least one check box required

     InfoPath 2003

    On a form with multiple check boxes, is there a way to make at least one of them required and have the form indicate that with the red asterisk? I'd like all required fields on the form to behave consistently...

     Thanks, Steph

  • 11-25-2008 01:38 PM In reply to

    Re: At least one check box required

    Hi, and welcome:

    Well, with data validation, you can add conditions to each checkbox. But that would merely give you a bunch of checkboxes outlined in red until one was selected and then they all are valid. I read an idea here the other day -- add a section to your form, make it tiny, type a bold, red asterisk in it and conditionally hide the section (so, if one of the checkboxes is selected, the asterisk would hide). That would give you the look you wanted. But to enforce the selection of at least one, you'd have to add rules to your submit to check that at least one was selected. If you aren't submitting the form, it is saved instead, you'd probably have to add code in your save request event.

    Hilary Stoupa

  • 11-25-2008 01:57 PM In reply to

    • Steph
    • Not Ranked
    • Joined on 11-25-2008
    • Posts 4

    Re: At least one check box required

     

    Thank you! I'll give it a try...Steph

  • 12-08-2008 06:13 AM In reply to

    Re: At least one check box required

    I needed for a customer something alike.  So what I did:

     - On the record level I added a hidden textbox, CanSubmit, DataType True/False and Default Value false
    -  Then I added to the textboxes of the record rules, yhich will be applied when the data changes,    First Rule:  Set the CanSubmit to false, Second Rule: Set the CanSubmit to true if conditions are true,   the conditions is the business reauiredments

    The submit button:  Add Rules, Submit using the data connection + conditions All Occurences of CanSubmit are equal to TRUE

    You can add a second rule, saying when Any Occurences of CanSubmit is false, show a dialog box.

     

    Frederik Van Lierde
    Blue InfoPath Blog  ¦  SilverSands Associate  ¦  Do you follow me already?  ¦  We work smart, not hard


    If this article was helpfull, don't forget to rate it, tnx!
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.