InfoPath 2007 form: Disabling checkboxes after five are checked

lsanbo1
lsanbo1 used Ask the Experts™
on
Hi!
I am wondering if there is a way, without code, to disable checkboxes in my form once five prior have been selected. In other words, there are nine checkbox fields but the user should only select five of nine. Is there any way to disable the remainder of the checkboxes once five have been selected through rules?

I would rather not have to set up a rule(s) per checkbox as this could get rather hairy. I am just looking to disable checkboxes after five are selected.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
MontoyaProcess Improvement Mgr

Commented:
Are you trying to do that after ANY five are selected, or after a specific five?

Author

Commented:
Just simply after five are selected - doesn't matter which ones...
Process Improvement Mgr
Commented:
I should start by saying that doing this without doing a rule per checkbox would surely require code. I'm not in front of InfoPath right now, so please allow me to throw out an idea and I'll try it myself in a bit... this is just my first stab at the solution.

I would create a text box that holds a numeric value. After each item is checked, I would increase the value of the textbox by 1. Then, and you'll probably hate this, you would have to check for that value to be >=5 to decide whether or not that checkbox is enabled.

Furthermore, we have to remember that after those five boxes are checked, they will not be able to uncheck the boxes (unless we provide them with a way to back out)

Just food for thought. :)
Clay FoxDirector of Business Integration

Commented:
Yah I agree.

You can also have a rule on each that decrements the check count when they are unselected if needed.

Then have all of your conditions on the check count value.

Author

Commented:
I really don't know if there's a more efficient solution to this question but I can say that this answer worked. Thanks for the creativity - it was a little work but does exactly what I need it to do!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial