PDA

View Full Version : Applying an Ext.form.ComboBox to multiple elements…



travisbell
7 Oct 2009, 9:15 PM
Hey guys,

I am using:



var search = new Ext.form.ComboBox({
store: person,
displayField:'Name',
typeAhead: false,
loadingText: 'Searching...',
width: 200,
pageSize:10,
hideTrigger:true,
tpl: personTpl,
applyTo: 'ac_name',
itemSelector: 'div.search-item’
});


Right now, and it’s only applying the ComboBox to the first input (‘ac_name’ element). How can I tell Ext to apply it to _all_ inputs with an id or class of ‘ac_name’?

travisbell
8 Oct 2009, 7:10 AM
After painfully searching (I must not have been using the right search terms!) I found this:

http://extjs.net/forum/showthread.php?t=79840&page=3

That outlines the code to get around this problem.