I've discovered this way works, but I feel that it could be generalized.
I am surprised that this use case is not provided for in the library.
Here is the rough code:
[PHP]function init() {
$sub = new Zend_Form_SubForm();
$this->addSubForm($sub, 'mytext');
}
function populate(array $values) {
$mytext = $values['mytext'];
foreach (array_keys($mytext) as $key) {
$this->getSubForm('mytext')->addElement(
'text', (string) $key, array(
)
);
}
return parent:opulate($values);
}[/PHP]


LinkBack URL
About LinkBacks




Reply With Quote
opulate($values);