WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Validating code on custom form?

[Resolved] 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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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

    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?

    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.

    Yeah, looks like I will have to find another captcha plugin… Let me know guys if you have recommendation.

    Plugin Author bestwebsoft

    @bestwebsoft

    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

    “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 ‘[Resolved] Validating code on custom form?’ is closed to new replies.