I just wanted to post a quick message pertaining to this - I ran into, yet
another, situation where I needed this. And, thanks to you Fozzyuw, I was
able to accomplish it. Thanks!

My very situation happened to be your first description in using <li> around
each element. I agree 100% I think it should be the default view helper for
radios/checkboxes since ... well .. they are indeed lists.

Thanks much for your follow ups. It helped greatly!

---
Philip
[email protected]
http://www.gpcentre.net/


On Tue, Dec 29, 2009 at 4:42 PM, Fozzyuw <[email protected]> wrote:

>
> And to finish up my threads above about not changing the default "Zend"
> prefix of "Zend_View_Helper" to a non-Zend prefix (it's a bit of a party
> foul to not do this)...
>
> If you create a custom form you might call it:
>
>    "class My_View_Helper_FormMultiCheckboxList  extends
> Zend_View_Helper_FormElement"
>
> Save the file in:
>    "/application/views/helpers/" as FormMultiCheckboxList.php
>
> To get the view to be able to find/load this custom view helper, you need
> to
> set a path for it.  To do this, open up your Bootstrap.php file and add the
> following code:
>
>    $view->addHelperPath(APPLICATION_PATH . '/views/helpers',
> 'My_View_Helper');
>
> where APPLICATION_PATH is a static variable that contains the absolute path
> to your "/application" folder (assuming you've created this variable
> already)
>
> That should allow you to use any custom helper that starts with the prefix
> "My_View_Helper" in it's class name.
>
> Of course, edit the names based on your needs.  I hope that helps!
>
> Cheers!
> --
> View this message in context:
> http://n4.nabble.com/How-do-you-decorate-MultiCheckbox-elements-tp634654p990632.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to