PDA

View Full Version : ComboBox arbitrary value



juandj
30 Jun 2008, 12:07 PM
Hello,

According to the docs:



forceSelection : Boolean
True to restrict the selected value to one of the values in the list, false to allow the user to set arbitrary text i...
True to restrict the selected value to one of the values in the list, false to allow the user to set arbitrary text into the field (defaults to false)



In the following code, I am trying to get a combo box that allows the user to select one of the existing options or to type their own...




{
xtype: 'combo'
,fieldLabel: 'Description'
,typeAhead:true
,triggerAction: 'all'
,selectOnFocus: true
,name: 'name'
,allowBlank:false
,width:220
,hiddenName: 'name'
,mode:'local'
,displayField: 'value'
,valueField: 'value'
,forceSelection:false
,mode: 'local'
,store:SimpleStore GOES HERE
,value:''
}


However, when user types their own, and I call from.getValues(), the combobox reports no value. :|

What else needs to be put in place to allow for the above mentioned behavior?


Thank you!

juandj
30 Jun 2008, 4:55 PM
In case somebody stumbles upon this,

I found the answer here:

http://extjs.com/forum/showthread.php?t=24258