• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Multiple Captcha's

Dan Hawkins

Active member
#1
Hi there,

I would like to display the reCaptcha and Q+A

Reasons:
Q+A contains a unique verification ID which each of our customers will be sent

I tried:
Code:
<div id="Captcha" data-source="{xen:link misc/captcha}">
    <xen:if is="{$captchaQuestion.captcha_question_id}">
        <div class="ddText"><label for="{$captchaQuestion.hash}">{xen:raw $captchaQuestion.question}</label></div>
        <input type="text" name="captcha_question_answer" id="{$captchaQuestion.hash}" value="" placeholder="{xen:phrase please_answer_the_question_above}" class="textCtrl OptOut" />
    <xen:else />
        {xen:phrase n_a}
    </xen:if>
    <input type="hidden" name="captcha_question_hash" value="{$captchaQuestion.hash}" />
</div>
On the recaptcha template AND directly on register_form AND help_captcha_unit
but it only displayed N/A

So I removed the "if is" query and the "else" so the question box appeared, but this didnt pull the correct question and answer through

So I tried:

Code:
    <div id="Captcha" data-source="{xen:link misc/captcha}">
    {$captchaQuestion.captcha_question_id}
        <div class="ddText"><label for="{$captchaQuestion.hash}">{xen:raw $captchaQuestion.question}</label></div>
        <input type="text" name="captcha_question_answer" id="{$captchaQuestion.hash}" value="" placeholder="{xen:phrase please_answer_the_question_above}" class="textCtrl OptOut" />
   
    <input type="hidden" name="captcha_question_hash" value="{$captchaQuestion.hash}" />
This returned an answer box - but no question... Indicating that no such question is inserted....

I tried a random value (which I knew wasnt in the unique ID) and alas - I got straight through, so the question + answer wasnt being checked...

Any ideas?

Thanks in advance!