ZF-11628: DijitParam "required" collides with the HTML5 attrib

Issue Type: Bug Created: 2011-07-30T15:42:35.000+0000 Last Updated: 2012-07-12T14:02:44.000+0000 Status: Open Fix version(s): Reporter: Jakob Schumann (j-schumann) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Dojo

Related issues: Attachments:


Zend_Dojo_Form_Decorator_DijitElement always sets the "required" attribute since issue #7660:

<pre class="highlight">
$dijitParams['required'] = $element->isRequired();

This causes invalid browser behavior as the HTML5 "required" attribute (…) defines an element as required if the attribute is present, regardless of the attribute value. So e.g. Firefox 5 displays "Fill out this element" on hover.

Rendering a non-required Zend_Form_Element_Text in an dojo-enabled (programmatic mode) form results in following html:

<pre class="highlight">

Additionally: Shouldn't the attribute be rendered as required="false" / required="true" as other boolean attributes are rendered in Zend_Dojo_ and as it was before the changes of #7760?

Required elements render with "1" as attribute value instead of "true":

<pre class="highlight">


Posted by MediaXtend (mediaxtend) on 2012-07-12T14:02:44.000+0000

Check ZF-11953, I just posted a workaround.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.