Back Forward Source HTML — Check boxes

Configure a check boxcheck boxto display or accept user input for a property that has two values.

Check boxes for True or False types

If a Single Value mode property has the Type True or False, the system uses only the two lowercase text values true and false for values. By convention, true corresponds to the checked state.

Check boxes for other types

If you use a check box to display or accept user input for a Single Value property that is not of type True or False, some care is needed to plan for the text clipboard value that represents the cleared (unchecked state).

The HTML element has the form:

<INPUT TYPE= "CHECKBOX" ...>

This element identifies only the checked value, not the cleared (unchecked) value.

If you specify true, T, t, Y, y, or 1 as the checked value in HTML, and the user clears the check box, the system records false, F, f, N, n or 0 as the clipboard value respectively. (The converse cases apply, but they are to be avoided as they confuse communications between users and developers.)

Avoid specifying a text string value other than one of these twelve values as the checked value in your source HTML, because results may be unexpected.

For example, if the exact text values "North" and "South" are property values, use option buttons, not a check box, to present the property to users. If you specify VALUE="North" in a check box and the user submits the form containing a cleared check box, the clipboard value recorded is the null string, not South. With option buttons, you specify both text values in the HTML.

Syntax

Save your check box HTML into an HTML Property rule. Then, reference that HTML Property in a property. Finally, reference the property in an HTML rule.

The syntax for a check box can look like:

{when $mode-show}
    <INPUT TYPE="checkbox" VALUE="true" READONLY >
{else}
     <INPUT TYPE="checkbox" VALUE="true" >
{end}

UpSource HTML tags and attributes