-- Luiz A Brandao Jr <fromv...@gmail.com> wrote
(on Monday, 02 March 2009, 12:03 AM -0300):
> I was trying to validate a page and verified that a Zend Form element
> creates an invalid XHTML attribute "helper". Like helper="formText".
> How can I prevent it from rendering? Not that I unconditionally need
> my page to be valid but I'd like to.
> 
> I tried $myElement->setAttrib('helper', null); but it gives an error
> when the Zend_Form_Decorator_ViewScript decorator is called.

The 'helper' property of the shipped elements are used to hint to the
ViewHelper decorator which view helper to utilize. In most cases, that
attribute is removed before calling the view helper itself to prevent
its inclusion in the actual rendered element. If you can detail which
elements do *not* work this way, I'll try and correct the issue.

BTW, there's a mismatch between the available (X)HTML validators and the
actual (X)HTML specifications -- the specifications actually allow for
arbitrary attributes. Unfortunately, the validators do not -- which is
wrong.

-- 
Matthew Weier O'Phinney
Software Architect       | matt...@zend.com
Zend Framework           | http://framework.zend.com/

Reply via email to