Submit Form On Enter


how can i submit my form by pressing enter

when i press enter in any input field, it only renew my captcha code !!!


Just check jquery to handling form submission. jquery can help u regarding this :) try on your own

It works in some browsers without doing anything. I think IE may not work and you may have to do some work to make that happen. Check around on the web for the javascript code to do it, it’s pretty simple.


id didnt work on chrome and firefox actually

i dont use ie at all, its not a matter :lol:

The Captcha may be causing the issue. I think Yii handles that differently when you use it. Use Firbug to see if the form is actually being submitted (you will see it in the networking tab).

I decided that Captcha is bad all around and use a simple JavaScript slider that is very effective and does not place the burden of validation on the user. Basically swipe the slider to submit. Their are also some other JavaScript components that do that client side, with only a bit less validation on man vs spam.