• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to make ajax (spry+php) captcha field?

Community Beginner ,
Dec 22, 2012 Dec 22, 2012

Copy link to clipboard

Copied

Hi I would like some help please. I'm having a contact form in which I have some spry text fields validated on blur and also I have made a server-side validation on them (PHP). My problem is that I also have a captcha field which currently has only the php validation and I'd also like to add some spry validation on blur. In fact what I'd like to do is when the user submits the captcha and moves on to the next field to throw him an error if the given code doesn't match to the generated one, without pressing the button (just like validate on blur does in spry text fields - some Ajax functionality).

How can I make this work?

TOPICS
Server side applications

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 26, 2012 Dec 26, 2012

Copy link to clipboard

Copied

I don't believe in Captchas.  They're not web friendly and their cryptic nature causes more user failures than successes.  If you need to stop spam, why don't you use a hidden field or honeypot in your form?  Then let your PHP script detect if the field is empty (human) or contains characters (robot).  Overall, this technique works quite well and it won't frustrate humans at all.

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 28, 2012 Dec 28, 2012

Copy link to clipboard

Copied

Hi, I'm not quite sure what you are talking about, could you give me an example?

Well since I 've already done this I think this would be a waste of time to re-build the form or the php script. Any ideas/help on my question??

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 28, 2012 Dec 28, 2012

Copy link to clipboard

Copied

>Hi, I'm not quite sure what you are talking about,

>could you give me an example?

To clarify what Nancy suggested: Honeypot uses a field on a form that is invisible to humans. The field is usually given a tempting name like phone, email, subject, etc. Spambots, being automated, don't know that the field is hidden and fill it in anyway. When the form is submitted, the field is validated and if it contains anything it is rejected.

CAPTCHA always results in some percentage of failed legitimate submissions so it is suggested that you exhaust all other methods before resorting to CAPTCHA.

>Any ideas/help on my question??

I wish I could but I have very little AJAX experience.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2013 Apr 16, 2013

Copy link to clipboard

Copied

LATEST

You might join this discussion to find out more about non-image and image/flash captcha solutions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines