Documentation

options

defines options for a select control

array| string options;

Example

//simple array
{ view:"select", label:"Version", options:["1.0", "1.5", "2.0"]}
 
//id-value pairs
{ view:"select", value: 2, label:"Branch", options:[
    { value:"Master", id:1 },
    { value:"Release", id:2 }
]},
 
//serverside options
{ view:"select", label:"Version", options:"server/options.php"}

See also

Details

Options can be set as:

  • a simple array;
  • an associative array of objects with id and value properties;
  • a string with a path to a script that loads options from server.

The initially selected options is defined by value property.

Back to top