reCaptcha for friendmail.tpl

Discussion in 'Customizations' started by John_6x6, Oct 14, 2010.

  1. John_6x6 Customer

    I have reCaptcha module installed and working on my contact forms (v4.2 developer, default theme) but I'd like to also have it on the "tell-a-friend" form too. Trying it myself, I installed the following modulehook function copied over from the userjoin.tpl file onto the friendmail.tpl file:

    PHP:
    {modulehook function="tpl_userjoin_details" options=""}
    It does put the captcha where I want it on the friendmail.tpl form now but it doesn't validate the captcha words typed in. It will take any work I put in there and still allow a post. I realize there is a disconnect and I'm only displaying the captcha form but have no idea how to fix.

    Anyone have an idea how to do this?
  2. seymourjames All Hands On Deck

    Personally I like others just remove the friendmail completely and only allow people to communicate in the normal way through the contact form (with or without capture on it). Seems like you are making it harder than it needs to be.
  3. Mike-N-Tosh Developer & Moderator

    Unfortunately, that is not going to work. Both of the contact forms (contactus and contact) have a modulehook in the php file for the submit the form. Then each of those also have a module hook in the template file which displays the form. Those are two separate functions in the reCaptcha module.

    The userjoin is different and has it's own function in the module specifically for the userjoin php file.

    It could certainly be done, but would require modification to the php for friendmail.
  4. seymourjames All Hands On Deck

    Or

    Only show the email friend link to people who are registered. It may cut down on some abuse.

    Or

    Remove the link/ capability completely

Share This Page