Multiple submit buttons along side reCAPTCHA

751 views
Skip to first unread message

Zite

unread,
Nov 17, 2011, 6:17:51 AM11/17/11
to reCAPTCHA
I have reCAPTCHA integrated just fine but this one problem that is
killing me. I have two submit buttons with in the form. One is a
basic submit button with no name and the other when clicked will tell
my processing script to do something different. What is happening is
when a user does the input for captcha and hits the return key, the
form is submitted with the 2nd buttons value and name causing the
processing script to do the delete function but if the user hits the
first submit button, the 2nd buttons values are not sent.

<input type="submit" value="Submit Form"/>
<input type="submit" name="delete" value="Delete"/>

What I want is when a user hits the return key within reCAPTCHA it
wont pass the value of the 2nd button to the script.

I can't separate the two button into different forms because the
delete button also passes along all the other included fields just
like the submit button but without the values of the 2nd button.'

Im using:
HTML
PHP
Smarty Templates

Thanks for any help!

Adrian Godong

unread,
Nov 17, 2011, 3:32:46 PM11/17/11
to reca...@googlegroups.com
http://stackoverflow.com/questions/925334/how-is-the-default-submit-button-on-an-html-form-determined

I believe there is a different implementation for each User Agent.

So to answer your question, other than using Javascript to block
return key form submission, I don't think you can do anything about
this.

> --
> You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> To post to this group, send email to reca...@googlegroups.com.
> To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.
>
>

--
Adrian Godong
adrian...@gmail.com

Zite

unread,
Nov 17, 2011, 5:57:27 PM11/17/11
to reCAPTCHA
So now I feel really dumb but I did find out what was causing the
problem. Thanks to your link I found out that when you hit the return
key in any field the browser will always use the first submit button
which happen to be the delete button. So there for it was never
reCAPTCHA in the first place. So I just placed that delete button at
the bottom of the form and will use CSS and divs to move it around.
Thanks so much for helping me look in the right direction.

Thank you --Zite

On Nov 17, 2:32 pm, Adrian Godong <adrian.god...@gmail.com> wrote:
> http://stackoverflow.com/questions/925334/how-is-the-default-submit-b...
> adrian.god...@gmail.com
Reply all
Reply to author
Forward
0 new messages