CheckBox

jdubs edited this page Oct 23, 2016 · 1 revision

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());
}

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.