[eluser]Unknown[/eluser]
Hi
Got problem implementing this. I am using a template to display my views, when I use this library, It did not display if I input the correct captcha or not. see below for the code on my controller:
function index()
{
$this->load->library('recaptcha');
$this->load->library('form_validation');
$this->load->helper('form');
$this->lang->load('recaptcha');
$this->template->set('nav', 'Home');
if ($this->form_validation->run()) {
$this->template->load('template','home_view',array('recaptcha'=>'Yay! You got it right!'));
} else {
$this->template->load('template', 'home_view',array('recaptcha'=>$this->recaptcha->get_html()));
}
}
On my view :
<?php echo form_open('Home'); ?>
<?php echo form_error('recaptcha_response_field'); ?>
<?php echo $recaptcha; ?>
<?php echo form_submit('recaptchasubmit','Check Recaptcha'); ?>
<?php echo form_close(); ?>
Any Ideas? I'm wondering if this would work on CI template library. Please advise.
Thanks