2009年3月11日星期三

[fw-core] Decorators

I need a little help. I've worked out how to format the form so that it
uses a table layout but I can't work out how to format the ReCaptcha so
that it is also wrapped in TR TD tags. This is the code I'm using. Any
help would be much appreciated.

public $captchaDecorators = array(
'Errors',
array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'
=> 'element')),
array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
);

$this->addElement('captcha', 'captcha', array(
'required' => true,
'captcha' => array('captcha' => 'ReCaptcha', 'privKey' =>
'myprivkey', 'pubKey' => 'mypubkey'),
'decorators'=>$this->captchaDecorators,
));


Thanks
Lionel

没有评论: