Boolean
A boolean format field is the ideal way to collect boolean or bit data. It simply creates a checkbox but, unlike regular HTML checkboxes, it guarantees that a valid form will return a value. With a regular checkbox, the field will only return a value if checked.
The following special attribute is available for boolean:
-
labelPassthrough
Optional. Attributes to pass through to thelabeltag wrapped around the checkbox and the text caption. Remember to escape any double quotes (") or hashes / pound signs (#) by doubling them. See the third example below.
Non-TerraField attributes will be passed through to the underlying checkbox tag (<input type="checkbox">). For example:
style="background-color : red"disabledonclick="submit()"accesskey="A"tabindex="4"
The last example below uses the sqBit datatype that is part of the Microsoft SQL Server Extension Pack. sqBit returns 0 or 1 instead of No or Yes. If you are working with Server, you may prefer to set up a preset in your TerraForm Settings file that defines sqBit as the default datatype for the Boolean format.
