1
TheFinni
CAPTCHA Frameworks unable to set num_chars
  • 2007/1/30 18:33

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


I don't know if I'm doing it right but I have managed to add the CAPTCHA to my form.

I am however unable to set certain configs of which the num_chars is most important to me.

It seems like "mode" and "name" are successfully set but no other values.

This is what I have so far:

include_once XOOPS_ROOT_PATH."/Frameworks/captcha/formcaptcha.php";
    
    
$rc = new XoopsFormCaptcha();
    
$reg_captcha = $rc->setConfig("mode","image");
    
$reg_captcha = $rc->setConfig("name","verification_code");
    
$reg_captcha = $rc->setConfig("num_chars",6);
    
$reg_captcha = $rc->render();
    
$reg_form->addElement($reg_captcha, true);

I would rather do it by the setConfig instead of touching the captcha config.php file (from which all settings work).