PDA

View Full Version : Search Form problems



PhilCarter
2 Dec 2010, 6:13 AM
Hi,

I'm attempting to build a proof of concept using touch, but I am running into a few troubles with regards creating a search form.

I have managed to get a form to submit using
Ext.form.FormPanel(formBase), but If I try and use
xtype: 'searchfield' in a
dockedItems list the value doesn't get submitted, but this achieves the look that I want. If I move the
ui: button in the standard
items list it doesn't display.

So my question is: can I have a
searchfield in dockedItems[/CODE], or how do I get a form button in the
items list object?

Full code below.

Works:


items: [
{
xtype: 'textfield',
placeHolder: 'Search',
name: 'searchfield'
}
],
dockedItems: [ {
xtype: 'toolbar',
dock: 'top',
items: [
{
ui: 'confirm',
text: 'Search',
handler: function() {
}
]
}]

Doesn't work, but looks as I want:


dockedItems: [ {
xtype: 'toolbar',
dock: 'top',
items: [
{
xtype: 'searchfield',
placeHolder: 'Search',
name: 'searchfield'
},
{
ui: 'confirm',
text: 'Search',
handler: function() {
}
]
}]