Hi,
We have received your query and it is now being processed. We will get back to you on this forum as soon as we can.
Regards,
BestWebSoft Support Team
Hi again,
The captcha works and displays correctly only in the case when you are using the standard pages of registration, login, comments form. In the case when you are using customs forms and pages, it is necessary to add changes to these pages, so that captcha could work correctly there.
Follow the instructions below in order to add Captcha plugin to your custom PHP or HTML form:
1) Install the Captcha plugin and activate it.
2) Open the file with the form (where you want to add the captcha).
3) Insert the following code to display captcha:
if( function_exists( 'cptch_display_captcha_custom' ) ) { echo "<input type='hidden' name='cntctfrm_contact_action' value='true' />"; echo cptch_display_captcha_custom() }; if( function_exists( 'cptchpr_display_captcha_custom' ) ) { echo "<input type='hidden' name='cntctfrm_contact_action' value='true' />"; echo cptchpr_display_captcha_custom() };
For HTML form use 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(); } if( function_exists( 'cptchpr_display_captcha_custom' ) ) { echo "<input type='hidden' name='cntctfrm_contact_action' value='true' />"; echo cptchpr_display_captcha_custom(); } ?>
4) Add the next code to the entered data validation function:
if ( ( function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true ) || ( function_exists( 'cptchpr_check_custom_form' ) && cptchpr_check_custom_form() !== true ) ) echo "Please complete the CAPTCHA.";
or (for HTML form)
<?php if ( ( function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true ) || ( function_exists( 'cptchpr_check_custom_form' ) && cptchpr_check_custom_form() !== true ) ) echo "Please complete the CAPTCHA." ?>
You could add this code 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 errors output) in the validation function, this notification message can be added to this variable. If the function returns ‘true’, it means that you have entered captcha properly. In other cases the function will return ‘false’.
Sincerely,
BestWebSoft Support Team
Hi,
Since there is no reply from you, we consider this topic as resolved. We hope you’ve found the solution. If you have any questions, please feel free to contact us via our Help Center – http://support.bestwebsoft.com/.
Sincerely,
BestWebSoft Support Team