Custom HTML Form CAPTCHA Not Displaying
-
I’ve installed, and activated, the plugin and I’m trying to insert a captcha into a simple html form but it’s not showing up. My understanding is that I need to insert the following php lines into the html form to make it work:
<?php if( function_exists( ‘cptch_display_captcha_custom’ ) ) { echo “<input type=’hidden’ name=’cntctfrm_contact_action’ value=’true’ />”; echo cptch_display_captcha_custom(); } ?>
<?php if( function_exists( ‘cptch_check_custom_form’ ) && cptch_check_custom_form() !== true ) echo “Please complete the CAPTCHA.” ?>
I inserted these two lines just above the submit button but the captcha is not showing up. Here is my code:
`<form role=”form” id=”WebToLeadForm” action=”https://xxxx.com/index.php?entryPoint=WebToLeadCapture” method=”POST” name=”WebToLeadForm”>
<div class=”form-group”>
<label for=”first_name”>First Name</label>
<input class=”form-control input-lg” id=”first_name” name=”first_name” type=”text”>
</div><div class=”form-group”>
<label for=”last_name”>Last Name</label>
<input class=”form-control input-lg” id=”last_name” name=”last_name” type=”text”>
</div><div class=”form-group”>
<label for=“title”>Title</label>
<input class=”form-control input-lg” id=“title” name=“title” type=”text”>
</div><div class=”form-group”>
<label for=”company”>Company Name</label>
<input class=”form-control input-lg” id=”account_name” name=”account_name” type=”text”>
</div><div class=”form-group”>
<label for=”phone”>Phone Number</label>
<input class=”form-control input-lg” id=”phone_work” name=”phone_work” type=”text”>
</div><div class=”form-group”>
<label for=”email”>Email</label>
<input class=”form-control input-lg” id=”email1″ name=”email1″ type=”email”>
</div><?php
if( function_exists( ‘cptch_display_captcha_custom’ ) ) { echo
“<input type=’hidden’ name=’cntctfrm_contact_action’ value=’true’
/>”; echo cptch_display_captcha_custom(); } ?><?php if( function_exists(
‘cptch_check_custom_form’ ) && cptch_check_custom_form() !==
true ) echo “Please complete the CAPTCHA.” ?><button type=”submit” class=”btn btn-default”>Submit</button>
</form>`
- The topic ‘Custom HTML Form CAPTCHA Not Displaying’ is closed to new replies.