Hiding fields from the cart -- specifically CAPTCHA

vossavantvossavant Member
in Help edited October 2012
Man, I don't like contacting you guys about this one, since the docs clearly state how to hide fields from the cart. However, I'm having trouble excluding a reCAPTCHA field from the cart. Basically, our customer is having trouble with spam submissions so wants to add a CAPTCHA field, which should (via AJAX I assume) check the field, then return false and prevent the cart popup from firing if the CAPTCHA is wrong.

Before I even get to the AJAX portion, I'm trying to prevent the CAPTCHA hidden value from showing up in the cart. Per the docs, I've tried adding x:name="recaptcha_challenge_field", h:name="recaptcha_challenge_field", and __:name="recaptcha_challenge_field", but none of those prevent the value from appearing in the cart.

Am I doing this properly? If so, perhaps the script that generates the field is overwriting what I've done. I just want to be sure so I can debug. Thanks.
  • fc_adamfc_adam FoxyCart Team

    Does the field need a name value? If you remove that it won't get submitted with the form at all. That said, the x: or __: prefixes should work as well. Could you whisper us the page you're working on this for us to take a look?
Sign In or Register to comment.