PDA

View Full Version : Search Field form submit not working in 0.92



robertj98
1 Aug 2010, 6:02 AM
Hi,

When using the 0.92 libraries, pressing enter in a search field does not trigger the form submit listener - also placeholder text is not displayed. Looking at generated code it does generate <form> HTML.

Sample code used:


var searchField2 = new Ext.form.SearchField({
placeholder: 'Search CollectGBStamps',
cls: 'usearch',
style: 'width: 250px; margin-left: 20px; '
});

// wrap the search field in a formpanel so we can capture the submit event
var searchForm2 = new Ext.form.FormPanel({
baseCls: 'x-form-nostyle',
items: searchField2,
standardSubmit: false,
listeners: {
submit: function() {
// on submit (enter) then display year
var value = searchField2.getValue();
alert(value);
if (value.length > 0) {
searchStore.read({ params: { parm: value } });
itemsearch.scroller.scrollTo({x: 0, y: 0}, true);
} // if
} // submit
} // listener
});


This works using the 0.91 libraries including placeholder text being displayed.
The above code was based on the search field code in the Twitter example - which also does not seem to work using 0.92 libraries.

Robert

jkarmel
2 Aug 2010, 4:27 PM
Did you ever find a solution that worked well?

robertj98
3 Aug 2010, 12:58 AM
Hi,

Just switched to using 0.9.3 and both this and the list group item issue are not working.
In 0.93 I do get the placeholder text appearing - but it does not seem to be firing the form submit action.

Robert

robertj98
3 Aug 2010, 1:05 AM
Hi,

Also just tried the Twitter example in 0.93 and this does not work also.

Robert