-
Notifications
You must be signed in to change notification settings - Fork 1
CheckBox
jdubs edited this page Oct 23, 2016
·
1 revision
This widgets creates a check box input type for user form input. Attached to a regular spec, the checked or unchecked value is associated with the spec. Options to define checked and unchecked values are available. The default values are true or false. Text to display to the immediate left of the checkbox may be set in the options.
<span class="CheckBox">[[Box]]</span><div>[[Box]]</div>
spec['Box'].checkbox({
checkedValue: 'Yes',
uncheckedValue: 'No',
displayText: 'Would you like to go to the park?'
});- checkedValue: Determines the value assigned to spec when checkbox is checked.
- uncheckedValue: Determines the value assigned to spec when checkbox is not checked.
- displayText: Determines the displayed text rendered to the immediate left of the checkbox.
onClick(): Triggered when the checkbox is clicked.
value(): Gets the current value based on checkbox state.
spec['Box'].checkbox.onClick = function() {
alert(spec['Time'].checkbox.value());
}