Hi, Hugo,
My contact form is working fine and now I would like to add captcha validation to it.
In my contact model under
contact_oke I have:
if (($contact["captcha"]) == false)
{
$this->output->add_message("Hmm... Who are you, Rocky? Please, enter the correct captcha code");
$result = false;
}
// This works
In my contact view:
<form action="/{/output/page}" method="post" class="forms forms-columnar">
...
<p>
<img src="/captcha.png" alt="captcha" />
</p>
// Validation doesn't show up
<xsl:if test="valid">
<p>Code of previous captcha correct: <xsl:value-of select="valid" /></p>
</xsl:if>
<p>Enter captcha code: <input type="text" name="code" />
<input type="submit" name="submit_button" value="Verzenden" class="btn btn-round" />
</p>
</form>
Since the contact_controller doing the post request method. I left this untouched for the moment.
Looking at the demos_captcha_controller. I was expecting the same code as in the captcha_controller but the code in the captcha_controller is to show the captcha image and is not used for validation, am I right?