Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCheckBox
Table of Contents |
Overview
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.
HTML Example
<span class="CheckBox">[[Box]]</span>
Advanced Scripting
<div>[[Box]]</div>
spec['Box'].checkbox({
checkedValue: 'Yes',
uncheckedValue: 'No',
displayText: 'Would you like to go to the park?'
});
Options
- 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.
Events
onClick(): Triggered when the checkbox is clicked.
Properties
value(): Gets the current value based on checkbox state.
Events, Properties and Methods Examples
spec['Box'].checkbox.onClick = function() {
alert(spec['Time'].checkbox.value());
}
Press h to open a hovercard with more details.