fm:Form_CheckBox


fm:Form_Checkbox

The fm:Form_Checkbox component is a quick way to generate a checkbox in an fm:from component of your project.

Example 1:

<fm:Form_Checkbox name="checkbox" value="1" />

Supported attributes

NameRequiredDefaultDescription
classOptionalThe css classname that will be assigned to the actual html form field. Note that a few default classes might be added
disabledOptionalN/AThis will set the html disabled attribute
idOptionalrandomizedThe id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component
labelOptionalN/AThis attribute will be used to generate labels for this component, if it's used within an fm:Form component
languageOptionalN/AThis specifies which language to use for the display of the form_country dropdown. Choices are:
  • en - English
  • es - Spanish
  • fr - French
  • nl - Dutch
nameRequiredN/AThe name of the form field. This is how the value will be submitted back to the server
readonlyOptionalN/AThis sets the html readonly attribute and controls if the user can change the value
requiredOptional0Set required to '1' if you'd like the form validator to check if this form element has a value before submitting
styleOptionalThe style attribute for the actual form component
valueOptionalThe current value of the form element

More examples

Example 2:

<fm:Form_CheckBox name="confirmrules" title="{%forms:confirmRules} *" formType="simple" class="left" id="confirmrules" required="1" />

Example 3:

<fm:Form_CheckBox name="confirmrules" title="{%forms:confirmRules} *" onchange="$('#rules').val( $('#rules').is(':checked') ? 1 : 0 );" formType="simple" class="left" id="confirmrules" required="1" />

See also