|
|||
|
I'm trying to understand how Zend_Form works. I've coded a Cms_Decorator_Label that extends Zend_Form_Decorator_Abstract (it writes a ':' after label text) but I cannot make it work correctly at a custo UserForm (extends Zend_Form)
try 1) Code:
$this -> addPrefixPath('Cms_Decorator', 'Cms/Decorator/','decorator');
try 2) Code:
$this -> addElementPrefixPath('Cms_Decorator', 'Cms/Decorator/','decorator');
try 3) Code:
$name = new Zend_Form_Element_Text('name');
$name -> addPrefixPath('Cms_Decorator', 'Cms/Decorator/','decorator');
try 4) Code:
$form = new UserForm(array('disableLoadDefaultDecorators' => true));
try 5) Code:
$name = new Zend_Form_Element_Text('name',array('disableLoadDefaultDecorators' => true));
try 6) Code:
$name = new Zend_Form_Element_Text('name',array('disableLoadDefaultDecorators' => true));
$name -> addPrefixPath('Cms_Decorator', 'Cms/Decorator/','decorator');
try 7) Code:
$name = new Zend_Form_Element_Text('name',array('disableLoadDefaultDecorators' => true));
$name -> addPrefixPath('Cms_Decorator', 'Cms/Decorator/','decorator');
$name -> addDecorator('Label');
try 8) Code:
$name = new Zend_Form_Element_Text('name',array('disableLoadDefaultDecorators' => true));
$name -> addPrefixPath('Cms_Decorator', 'Cms/Decorator/','decorator');
$name -> addDecorator('Label',array('tag' => 'dt'));
try 9) search at zfforums -> nothing found -> write a post... =/ I've also tryed to don't disable default decoratos and add decorator class to element with: Code:
$name -> addDecorator(new Cms_Decorator_Label(),array('tag' => 'dt'));
is there an easy way to do this?? i just want to create a custom decorator... =/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|