ZF-10491: addDisplayGroup with variable
Description
Hello,
i use Zend_Form myself in this form:
$phone = new Zend_Form_Element_Text('phoneNr'); $phone->setLabel('phoneNr'); $phone->setFilters(array('StringTrim')); $phone->setValue($this->_data->phoneNr); $this->addElement($phone);
When i want to add such a form element to a display group, i have to type the "id" of the element, instead of the variable:
$this->addDisplayGroup(array('phoneNr'), 'name', ...);
Better would be: $this->addDisplayGroup(array($phone), 'name', ...);
Comments
Posted by Richard Tuin (richardtuin) on 2010-11-19T10:29:53.000+0000
I think it would make sense to implement this functionality. Precondition should be that the element defined in the variable is already added to the Zend_Form instance to be consistent with the current functionality.
I've uploaded a patch that enables this functionality, and a unit test.
Posted by Richard Tuin (richardtuin) on 2010-11-20T02:36:09.000+0000
[SVN:r23412:bittarman] ZF-10491: Applying patch from Richard Tuin (See: http://tinyurl.com/2853nos)
Posted by Ramon Henrique Ornelas (ramon) on 2010-11-21T05:23:02.000+0000
Merged to branch release 1.11 r23422.