<?php
class Test extends Zend_Form{
function init() {
$this->setElementsBelongTo("tree");
$branch = new Zend_Form();
$branch->setElementsBelongTo("branch");
$branch->addElement("text", "leaf");
$this->addSubForm($branch, "branch");
echo $this->getSubForm("branch")->getElement("leaf")->getFullyQualifiedName();
}
}
?>
Echos "branch[leaf]" and not expected "tree[branch][leaf]"
When the whole form is rendered the getFullyQualifiedName() of the element is (as expected) "tree[branch][leaf]".
Am I missing something here?