You can do this without javascript - here is a SimpleXML example <input type="multiselect" token="alloptions" searchWhenChanged="true">
<label>Options $alloptions$</label>
<choice va...
See more...
You can do this without javascript - here is a SimpleXML example <input type="multiselect" token="alloptions" searchWhenChanged="true">
<label>Options $alloptions$</label>
<choice value="All">All</choice>
<search>
<query>
| makeresults count=20
| streamstats count as row
| eval option="Option ".mvindex(split("ABCDEFGHIJKLMNOPQRSTUVWXYZ",""),row-1)
| eval label="Option ".mvindex(split("abcdefghijklmnopqrstuvwxyz",""),row-1)
| table option label
</query>
</search>
<fieldForLabel>label</fieldForLabel>
<fieldForValue>option</fieldForValue>
<delimiter>,</delimiter>
<change>
<eval token="form.alloptions">case(mvcount('form.alloptions')=0,"All",mvcount('form.alloptions')>1 AND mvfind('form.alloptions',"All")>0,"All",mvcount('form.alloptions')>1 AND mvfind('form.alloptions',"All")=0,mvfilter('form.alloptions'!="All"),1==1,'form.alloptions')</eval>
</change>
</input>