XForms/Checkbox

Motivation
You have a boolean true/false value and want an input control to have a simple checkbox for a yes/no or true/false answer.

Method
We will use a standard input control but use the bind statement to bind the instance to a boolean datatype. We will do this in two ways, one using a bind without an ID and using the bind with an id so that we can reference the bind statement.

Note that checkboxes can also be demonstrated by using the xf:select control. But in that case a series of space-delimited values is stored in the value associated with the control.

Link to XForms Application
Load XForms Application

Sample Program
    XForms Checkbox Demo  Bool 1:  

 Bool 2:  

 Bool 1:  

<xf:output bind="bool2"> <xf:label>Bool 2: </xf:label> </xf:output>