You can create a custom element:


> $element = $this->createElement('Custom', 'my name');
> 

And then create a Custom element class:



> class My_Form_Element_Custom extends Zend_Form_Element 
> {
>     public $helper = 'formCustom';
> }
> 


Note that your view helper should be called formCustom.  Then add your
element and helper paths to the form:



>         $this->addPrefixPath('My_Form_Element_', 'My/Form/Element/',
> 'element');
>         $view->setHelperPath('My/View/Helper', 'My_View_Helper');
> 

And it should display the element using your custom view helper.

-- 
View this message in context: 
http://n4.nabble.com/Assign-custom-view-helper-Zend-Form-tp1583220p1583678.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to