Welcome! To use this support forum, please Login or Join Today!

   

Contact form not vaildating fields

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

Hi;

The theme provided contact form is not validating the name and email fields.  If I left them empty and write something in the comment field and hit the submit button, the forms allows it. 

http://www.coopaee.com/?page_id=85


I would also like to add a captcha to avoid spam.  What do you recommend?

Regards;

Carlos

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

You might want to try a more robust plugin like Contact Form 7 for something like this. The contact form that comes with the theme is a page template and isn’t very robust at all.

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

Come on Casey Thats what I pay for???

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

Sorry, I sped through this thinking you were asking about captcha. I’ve updated the contact form page template, so you should be able to validate all fields now. You can re-download the theme or just grab contact-form.php from here: http://pastebin.com/raw.php?i=zimrzYFd

As for adding your own captcha, there is a built in “honeypot” captcha which is basically a bot trap hidden form field. If the field is filled out, the form does not submit. If you want to implement more advanced captcha, you might try recaptcha or adding a simple math problem to the form.

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

Excellent!!!! now we are talking!!!  I will update the contact-form.php and let you know the results. 

Thank you!!!

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

Fyi, it might be best to update from the theme download. I’ve added some additional functionality since this post.

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

Great !!! I will do it!!!  I fast updated the php and now the validation is working but I dont see the honeypot captcha to be working.  Any idea?

I will look forward the recaptcha you mention. 

Thank you.

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

You won’t see the captcha. It’s a bot trap..not a human trap smile
http://www.londonswebdesign.com/articles/Web-articles-Honeypot-CAPTCHA-vs-Spambots.html

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

Hi Casey;

All fields are validating now but When I click the send button Where it is sending the email?  I dont see where to put the mailto in the theme options. 

Please advice.

Thank you.

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

It should be sending to the contact email defined in theme options.

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

Please, Could you be more specific, because in the contact form I only have the From email and From Mail, both of them referring to the “copy of their email” check mark

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

The from email is the email where you should receive the form submissions. If this is not set, it should default to the site admin.

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

The e-mail information in the from field is correct, but when I hit the submit button I dont receive any email, then I installed the WP-Mail-SMTP, configure it and the test from this plug-in was successfull these means that the hosting relay is working.  Tried again after the plug-in test but nothing was received.

Any log that I can look at? 

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM

 

The form uses basic PHP mail. Your hosting control panel should have a PHP error log if there are any errors.
I assume you’ve checked your spam folders?

{name}
Rank

Total Posts: 11

Joined 2011-10-09

PM

 

I checked the spam and nothing found.  I just activated the error logs under GoDaddy error logs

{name}
RankRankRankRank

Total Posts: 3066

Joined 2011-04-27

PM