Page 1 of 1

FeedBackForm & Captcha

Posted: Thu Dec 17, 2009 8:01 am
by MAKAPOH
How to check Captcha in FeedbackForm Module?

From Captcha docs:
To show a captcha image:
// create a reference to a Captcha module object
$captcha = &$this->getModuleInstance('Captcha');
// show the captcha image
echo $captcha->getCaptcha();
To check the user input:
// create a reference to a Captcha module object
$captcha = &$this->getModuleInstance('Captcha');
// check the user input (the checkCaptcha method will return TRUE if $input is correct, FALSE if $input is incorrect)
$validated = $captcha->checkCaptcha($input);
how to call getModuleInstance method from ffForm class?

or how to use Callback-Function in FeedBack module to call captcha?