Hey guys! I have a dijit.form.ComboBox that needs have value checking applied against it.
Specifically the box is below…
<input dojoType="dijit.form.ComboBox"
store="xvarStore"
value="[% xv %]"
searchAttr="name"
name="xvar_names_[% section_count %]_arg_[% loop.count %]"
id="xvar_names_[% section_count %]_arg_[% loop.count %]"
/>
the [% ….. %] stuff are values from Template Toolkit.
Anywho, the point of a ComboBox of course is that you can select a value or put your own in and that functionality I am not looking to change. What I do need to do is pop up or somehow nag someone if they put a value in that not in the list.
Anyone have a clue how I might do this. I thought about an onBlur event but I’m still a little mystified.
Any pointers in the right direction would be appreciated.
Janie
If you want to require that the user enter a value that is in the list, then you probably want FilteringSelect, not ComboBox. FilteringSelect does exactly this.
http://dojotoolkit.org/reference-guide/dijit/form/FilteringSelect.html
I’ve contrasted these two widgets in a blog post:
http://kennethfranqueiro.com/2010/06/combobox-vs-filteringselect/