ZF-12249: Zend_Form::addElement fail to make element name consistent.

Issue Type: Bug Created: 2012-05-25T13:25:21.000+0000 Last Updated: 2012-05-25T13:58:13.000+0000 Status: Closed Fix version(s): Reporter: Jim Chen (peeer) Assignee: Frank Br├╝ckner (frosch) Tags: - Zend_Form

Related issues: - ZF-12119



say, $form->addElement('text', 'field-name', $options); Then, the element can be retrieved by $form->field-name. However, $form->field-name->getName() == fieldname.

The reason is that Zend_Form_Element will filter ($name) before setting it. However form still has it in Zend_Form::$_elements[].

The side effect of this is that when doing $form->isValid($post). This field will lost track of posted value.


No comments to display

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.