ZF-9974: Zend_Form_Element->belongsTo not usable with same named multiple elements


Lets say i want to create two arrays inside one form, using belongsTo: if i want to use they same keys for both arrays, i have to name those elements the same. Unfort., even with different ids, there maynot be more than one element what results in the second element (in this case: remove[$i]) overwriting the first (in this case status[$i]).

class My_Form_Random extends Zend_Form {

public function init()
    $data = array(1 => 'test1', 2 => 'test2');
    foreach ($data as $field => $val)
        $this->addStatusElement($field, $field, $val);

    $this->addElement('submit', 'submit');


protected function addStatusElement($id, $label, $value)
    $element = new Zend_Form_Element_Select('add_'.$id);



protected function addRemoveElement($id)
    $element = new Zend_Form_Element_Checkbox('remove_'.$id);



Postponing for Zend Framework 2.0 development.