Hi,
I am trying to use the following inside a form
But nothing happens when I press enter in Safari (which simulates the standard submit).Code:listeners:{
submit: function( myThis, submitResult ) {
alert('submit');
}
What am I doing wrong?
Printable View
Hi,
I am trying to use the following inside a form
But nothing happens when I press enter in Safari (which simulates the standard submit).Code:listeners:{
submit: function( myThis, submitResult ) {
alert('submit');
}
What am I doing wrong?
Does clicking the button fire the event? I think you actually have to wire the enter key to perform the submit with Touch.
The Enter Button fires the standardFormSubmit.
But I would prefer to fire the button handler on Enter.
Hi, you have to listen on every field in the form, add this listtener to every field:
Code:listeners: {
keyup: function(fld, e){
if (e.browserEvent.keyCode == 13 || e.browserEvent.keyCode == 10) {
e.stopEvent();
fld.fieldEl.dom.blur(); // Hide keyboard
window.scrollTo(0,0); // Scroll to top
yourForm.submit({
waitMsg : {message: 'Submitting...', cls : 'loading'}
});
}
}
}