_JS.Chosen🔗 Enhanced HTML selects with search-box and improved multi-select

Constructor: [options [[selected] [prompt]]]

options – vector of options or 2 column matrix of displayed[;1] and returned[;2] values

selected – Boolean or integer array indicating pre-selected options(s)

prompt – first item to display (has no value) (default '[Select]')

Public Fields:

Options – vector of options or 2 column matrix of displayed[;1] and returned[;2] values

Selected – Boolean or integer array indicating pre-selected options(s)

Disabled – Boolean or integer array indicating disabled options(s)

Prompt – first item to display (has no value) (default '[Select]')

options – a namespace that collects the various options (see doc)

Examples:

Chosen ('Choice 1' 'Choice 2' 'Choice 3')

Chosen (3 2⍴'One' 'c1' 'Two' 'c2' 'Three' 'c3')

Chosen ((3 2⍴'One' 'c1' 'Two' 'c2' 'Three' 'c3') 2) ⍝ second item is selected

Chosen ((3 2⍴'One' 'c1' 'Two' 'c2' 'Three' 'c3') (0 1 0)) ⍝ second item is selected

Chosen ((3 2⍴'One' 'c1' 'Two' 'c2' 'Three' 'c3') 2 3 'Pick One') ⍝ second item is selected, third item is disabled

Chosen ((3 2⍴'One' 'c1' 'Two' 'c2' 'Three' 'c3') (2 3) 1) ⍝ second and third items are selected, first item is disabled

Relevant Sample Pages:

Controls used on this page: Dyalog: Tabs Base HTML: style