DefinedDropDown

jdubs edited this page Oct 23, 2016 · 1 revision

Table of Contents

Overview

This widget creates a drop down list of defined values and text and stores selections in text spec control.

HTML Example

<span class="States">[[TextSpec]]</span>

Advanced Scripting

<div>[[TextSpec]]</div>
spec['TextSpec'].statedropdown({
	valueType: "abbr", 
	displayType: "full"
});
spec['TextSpec'].countrydropdown();

Options

  • valueType: Defines the value stored for the spec. Choices include: "abbr" and "full". "abbr" stores the abbreviation, and "full" stores the full name (Ex: full = abbr / Alabama = AL)
  • displayType: Defines the display text for the dropdown. Principles are the same as valueType
  • debug: True or false. When true the control holding the value is displayed.

Events

onChange(): Triggered when the selection changes.

Properties

  • selectedValue(): Gets the currently selected value.
  • selectedText(): Gets the currently selected display value.
  • selectedIndex(): Gets the currently selected index (0 based).

Events, Properties and Methods Examples

spec['TextSpec'].statedropdown.onChange = function() {
	alert(spec['TextSpec'].statedropdown.selectedText());
}
spec['TextSpec'].countrydropdown.onChange = function() {
	alert(spec['TextSpec'].countrydropdown.selectedIndex());
}

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.