Search
BaseForm.createDropDownList Method
See Also
 






Creates a drop-down list with the specified options.

Namespace: MindFusion.Scheduling
File: BaseForm.js

 Syntax

JavaScript  Copy Code

function createDropDownList (options)

 Parameters

options

Object. Object, containing data for the new control.

 Return Value

Object. The newly created drop-down list.

 Remarks

The options parameter should match the following pattern: { id: id, text: text, events: {"name": handler} }

 Example

The following code adds a new drop down list to a custom form. The custom form is represented by a class that extends BaseForm:

JavaScript  Copy Code

drawContent() {
  super.drawContent();

var control = this.createDropDownList({ id: "rank", items: this.getLocations(), initValue: this.getItemLocationIndex(), addEmptyValue: false });
  control.element.style.width = "200px";
  this.addControl(control);
………
}

 See Also