API
@-Formulas
JavaScript
LotusScript
Reg Exp
Web Design
Notes Client
XPages
 
Saving Screen Space When Using Checkbox Fields
One of the benefits of Domino is the dynamic nature of options for check boxes and radio buttons. A profile document, maintained by an administrator, can define the choices for the check box or radio buttons. However, we've seen instances where this can be taken too far. The form ends up with 25 or more choices and your screen real estate is taken up with a big check box field.

One solution to this problem is a <SELECT> field instead of a check box field. But with this solution your users have to know to hold down CTRL while clicking to select multiple values. A check box field is more intuitive for your users.

To still use a check box field, but save screen real estate, you can use a style sheet "box" to surround the check box field. The "box" will have a scroll bar and only show as tall as you want, despite the number of check box choices. Here's how to do it:

First, on your form, define a style sheet class to be used as the container for the check box field. This is some code that can be placed into the HTML Head section of your form:
"<STYLE type=\"text/css\">" + @NewLine +
".FieldGroup { height:100; width:300; border:solid thin Gray; overflow:auto }" + @NewLine +
"</STYLE>"

Obviously, you can fiddle with the values to get the desired effect.

Next, put some pass through HTML around your check box field to apply this style to the field. Before the field, put in this pass through HTML: <DIV class="FieldGroup"> and after the field, close out the division with </DIV>.

The field, when viewed with a CSS browser, will be in a little boxed area that has a scroll bar. The user can scroll up and down and check boxes along the way without having to hold down the CTRL key.