Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

If there are a number of choices and any combination of them could be selected, not just a single one, then radio buttons are not the way to go. You might be better off using a number of check boxes. The layout for a check box works in the same way as for radio buttons. The check box is placed indented from the left most edge and the label text is placed to the right of it. Other than with radio buttons, you cannot define any number of check boxes. This field allows the definition of only one check box, which is associated with one variable. If you need multiple check boxes you need to define one field for each of them. To make it look like a cohesive group you simply provide a description only for the first check box. All of the check boxes will be positioned in such a way that they look like a group, even though they are separate entities and their selections are conveyed to different variables. The description is placed above the check box and uses the entire available layout width. To specify a check box create a <field> tag and use the type attribute with a value of check. As with all other input fields, the variable attribute specifies the variable that should be replaced with the user input.

Specific Spec Attributes

Attribute

Usage

Required

Possible Values

Default Value

true

The value the underlying field variable receives if the checkbox is checked.
The checkbox is checked if the resulting effective field value matches this value.
Variable references in the attribute's value are dynamically resolved during an installation.

no

any string

true

false

The value the underlying field variable receives if the checkbox is unchecked.
The checkbox is unchecked if the resulting effective field value matches this value (or if it does not match the value of the true attribute).
Variable references in the attribute's value are dynamically resolved during an installation. 

no

any string

false

Example

The following example creates a check box with description. The check box will not be selected when the UI is first presented. This could also be accomplished by omitting the set attribute.

Code Block
languagexml
titleExample
<field type="check" variable="checkSelection.1">
  <description id="description.check.1" txt="This is a description for a check box" />
  <spec txt="check box 1" id="check.label.1" true="on" false="off" set="false"/>
</field>

...