The HotDocs Computation Archive
Get Extra Help

0128 - Can I GRAY out Multiple Choice Options?

Description:

Various techniques and workarounds that give the equivalence of GRAYing out or disabling multiple choice options.


• Explanation •

HotDocs does not permit you to GRAY out or disable individual multiple choice options. But there are a number of techniques that can provide a similar result.

Option 1 - CLEAR and ADD.  You can use CLEAR and ADD to control which options are available. For example, say my original options for multiple choice variable Colors-m are:

1. Blue
2. Green
3. Red

Suppose that, based on the user's answers, I may not want Green to be an option. I could write a script in the dialog containing Colors-m (or in a computation prior to Colors-m) that reads:

CLEAR Colors-m
ADD "Blue" TO Colors-m
IF Condition = TRUE
   ADD "Green" TO Colors-m
END IF
ADD "Red" TO Colors-m

The CLEAR instruction clears all of the multiple choice options (i.e. blue, green, red). The ADD instructions add an option to the multiple choice ("Blue", "Red" and "Green"). The "Condition" is whatever test you wish to use to determine if "Green" should be an option (e.g. SomeVariable = "Some Value"). Based on this script, if the condition for "Green" is not met, only "Blue" and "Red" are given as options for the end user.

Option 2 - TRUE/FALSE Variables.  The second option is to make all of the choices in the multiple choice variable true/false variables (e.g. Blue-b, Green-b and Red-b). You can make them appear to be a multiple choice variable by gouping them together in a dialog and using "Select all that Apply" in the dialog's Options. You can then add a script that will GRAY or HIDE certain variables if the conditions are not met to include them:

IF Condition != TRUE
   GRAY Green-b
END IF

or,

IF Condition != TRUE
   HIDE Green-b
ENDIF
 

• Contributors •

Terry March
HENLEY, MARCH & UNGER CONSULTING, LTD.
1335 Dublin Road, Suite 105C
Columbus, Ohio 43215
(614) 340-3444