Title: Validating code on custom form?
Last modified: August 20, 2016

---

# Validating code on custom form?

 *  Resolved [siichan](https://wordpress.org/support/users/siichan/)
 * (@siichan)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/validating-code-on-custom-form/)
 * I have a custom form in html page. I already added the code to display the captcha
   and it shows up fine. However the form still goes through even though the answer
   is wrong.
 * My question is, where do I put this code:
    `<?php if( function_exists( 'cptch_check_custom_form')&&
   cptch_check_custom_form() !== true ) echo "Please complete the CAPTCHA." ?>`
 * Is it right in the form or in the functions.php? I tried putting it in the form
   just like the first code, but it doesn’t work.
 * Please advise. Thank you!
 * [http://wordpress.org/extend/plugins/captcha/](http://wordpress.org/extend/plugins/captcha/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [nestor_alveyra](https://wordpress.org/support/users/nestor_alveyra/)
 * (@nestor_alveyra)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627012)
 * I got a problem also with my custom form, the captcha is appearing but when I
   tried to submit the form, it triggers always the form action attribute. Can you
   help me with this one? Thanks
 *  [Lock-N-Load](https://wordpress.org/support/users/lock-n-load/)
 * (@lock-n-load)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627055)
 * I have the exact same issue as **siichan**. I can integrate the captcha code 
   just fine into the custom form page. Shows up perfect. BUT, I tried putting the
   code suggested in both the form_processor.php page that processes the form and
   in the actual forms page itself (as these are 2 different pages). Neither worked.
   The captcha field is blown off and not even checked, you could put nothing, something,
   anything and it blows off the check.
 * It would seem code needs to be in the actual form page and NOT the external php
   form processor page as if it is in the external php form processor page, you 
   have already submitted the data to the php form processor page so it is to late
   to do the check. But like I said, putting the code in the form page did not work
   either.
 * Any help?
 *  [Lock-N-Load](https://wordpress.org/support/users/lock-n-load/)
 * (@lock-n-load)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627106)
 * Does not seem like these guys come around much to offer support. I have tried
   email, their discussions on their website, this forum and zero response. Weak.
 *  Thread Starter [siichan](https://wordpress.org/support/users/siichan/)
 * (@siichan)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627107)
 * Yeah, looks like I will have to find another captcha plugin… Let me know guys
   if you have recommendation.
 *  [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627153)
 * Hello,
 * This checking
    <?php if( function_exists( ‘cptch_check_custom_form’ ) && cptch_check_custom_form()!
   == true ) echo “Please complete the CAPTCHA.” ?> you should add where you have
   the fields checking of the existing form.
 * Kind regards,
    Support Team
 *  [Lock-N-Load](https://wordpress.org/support/users/lock-n-load/)
 * (@lock-n-load)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627157)
 * “you should add where you have the fields checking of the existing form.”
 * what does that even mean? it would be a lot easier to answer questions more clearly
   maybe with examples or more detail instead of having to have 5,6,7 posts to make
   it clear

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Validating code on custom form?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/captcha_92b6c9.svg)
 * [Captcha](https://wordpress.org/plugins/captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/captcha/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Lock-N-Load](https://wordpress.org/support/users/lock-n-load/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/validating-code-on-custom-form/#post-3627157)
 * Status: resolved