Dear Zend framework community,

I just noticed the Zend_Dojo_Form_Element_SimpleTextarea element is not properly rendered by its view helper. A 'type' attribute is added in contradiction with the HTML 4 specification (http://www.w3.org/TR/html4/interact/forms.html#edef-TEXTAREA).

I would suggest removing the commented line in the following code from the view helper (Zend_Dojo_View_Helper_SimpleTextarea):

public function simpleTextarea($id, $value = null, array $params = array(), array $attribs = array())
    {
        if (!array_key_exists('id', $attribs)) {
            $attribs['id']    = $id;
        }
        $attribs['name']  = $id;
        $attribs['type']  = $this->_elementType; // <= REMOVE THIS LINE

        $attribs = $this->_prepareDijit($attribs, $params, 'textarea');

        $html = '<textarea' . $this->_htmlAttribs($attribs) . '>'
              . $this->view->escape($value)
              . "</textarea>\n";

        return $html;
    }

Regards
--
Guillaume ORIOL
Software engineer
Technema

Reply via email to