Forums/Captcha plugin

I would like to add Captcha to custom form on my website. How can I do this?

BestWebSoft Support Team
posted this on May 22, 2013 17:52

Please follow the instructions below.
= I would like to add Captcha to custom form on my website. How can I do this? =
1. Install the Captcha plugin and activate it.
2. Open the file with the form (where you would like to add the captcha to).
3. Find a place to insert the code for the captcha output.
4. Insert the necessary lines:
`if( function_exists( 'cptch_display_captcha_custom' ) ) { echo ""<input
type='hidden' name='cntctfrm_contact_action' value='true' />""; echo
cptch_display_captcha_custom() } ;`
If the form is HTML you should insert the line with the PHP tags:
`<?php
if( function_exists( 'cptch_display_captcha_custom' ) ) { echo
""<input type='hidden' name='cntctfrm_contact_action' value='true'
/>""; echo cptch_display_captcha_custom(); } ?>`
5. Then you should add the lines to the function of the entered data checking  
`if( function_exists( 'cptch_check_custom_form' ) &&
cptch_check_custom_form() !== true ) echo ""Please complete the
CAPTCHA.""`
or
`<?php if( function_exists(
'cptch_check_custom_form' ) && cptch_check_custom_form() !==
true ) echo ""Please complete the CAPTCHA."" ?>`
You could add this line to the variable and display this variable in the
required place instead of `echo ""Please complete the CAPTCHA.""`. If
there is a variable (responsible for the errors output) in the check
function, this phrase can be added to this variable. If the function
returns 'true', it means that you have entered captcha properly. In all
other cases the function will return 'false'.

 

Comments latest first

User photo
BestWebSoft Support Team
BestWebSoft

Mel,

 

One of the installed plugins may cause a scripts conflict. Please try to deactivate all the installed plugins except captcha and contact form. Then check if the problem remains the same.

 

Sincerely,

Support Team

November 27, 2013 20:26
User photo
Mel

Here is the link to my page with the contact form:

http://www.melskitchencafe.com/contact-form

I attached two screenshots, one of the CAPTCHA plugin settings and one of the Advanced settings showing the CAPTCHA checkbox for the Contact form pro plugin.

 

Thanks.

 

Mel

November 27, 2013 20:16
User photo
BestWebSoft Support Team
BestWebSoft

Dear Mel,

 

Please provide a link to the page with the contact form, a screenshot of captcha's and contact form's settings.

 

Sincerely,

Support Team

November 27, 2013 20:10
User photo
Mel

Thank you for your help/responses. I was able to update the contact form pro plugin to 1.16. I emptied the cache and refreshed all the settings in the captcha and the contact form pro plugin...and still, captcha is not showing up on my contact form. The CAPTCHA option is selected under "Settings" in the contact form pro plugin. Is there something else I need to be selecting/doing for the captcha to show up on my contact form?

Thanks!

Mel

November 27, 2013 19:45
User photo
BestWebSoft Support Team
BestWebSoft

Mel,

 

1) I don't see a link to update to 1.16 - please try to reload the page with plugins (/wp-admin/plugins.php) several times.

2) By follownig the link you received you always download the latest version of the product.

 

Sincerely,

Support Team

November 27, 2013 11:09
User photo
Mel

I just upgraded to the Contact Form Pro last night...seems strange and slightly frustrating that what I purchased last night is an old version of the plugin unless version 1.16 was rolled out today. On my plugin list (through Wordpress) I don't see a link to update to 1.16. I've also searched this website/forum. Is there an easily accessible link to get the newest version? I don't want to install another plugin (the updater plugin) if possible. Thank you.

Mel

November 26, 2013 22:49
User photo
BestWebSoft Support Team
BestWebSoft

Dear Mel,

 

Please update your contact form plugin to the recent version and try again (version 1.16)

 

Sincerely,

Support Team

November 26, 2013 22:42
User photo
Mel

Thank you for your response; however, I have marked CAPTCHA on the plugin settings page but it still doesn't show up. I'm getting this error when I save:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/melskitc/public_html/wp-content/plugins/contact-form-pro/contact_form_pro.php(13) : eval()'d code on line 287

 

Will this error impact the CAPTCHA showing up (I submitted a ticket about this error yesterday).

 

Melanie

November 26, 2013 19:31
User photo
BestWebSoft Support Team
BestWebSoft

Hi Mel,

 

In your case it is necessary to mark checkbox CAPTCHA on the plugin settings page so that captcha could be displayed. You do not need to do anything else.

 

Sincerely,

Support Team

November 26, 2013 11:21
User photo
Mel

Hello, I'm trying to add CAPTCHA to Contact Form Pro. I apologize for the fact that I'm not super technical - this may seem like a silly question but what file do I open to insert the lines indicated in step 4? I opened up the contact_form_pro.php but the file took a really long time to open and there were hundreds of lines of text inbetween the php tags. Is this the right file? Thanks for your help!

November 26, 2013 09:14
User photo
BestWebSoft Support Team
BestWebSoft

Hi M,

 

If you mean this plugin - http://wordpress.org/plugins/contact-form-7/, the functionality to add captcha to contact form 7 is available in the pro version of the plugin - http://bestwebsoft.com/plugin/captcha-pro/.

 

Sincerely,

Support Team

November 25, 2013 11:21
User photo
M Bleau

Greetings.  I did add the lines of html code that you suggest above to different areas on my Contact Us page and to the Contact-7 form settings on my WordPress Web site.  No captcha is created doing this.  The plugin is active and the only thing it does is to provide a captcha on log in to my admin. page.

 

Can you please say if there is anything else I should do to create a captcha on my page with the Contact-7 form?  I would love for it to go at the bottom of the form, between the message box and the submit button.

 

Thank you.

m

November 24, 2013 01:41