Our blog
Zend Framework Form HTML Array Notation
After losing an afternoon trying to get my extended Zend Dojo Form class to give me HTML array notation, I have finally found a solution that works. To celebrate I've decided to share it should anyone else suffer a similar problem.
Here is the method:
-
public function addSubFormEl($subFormName, $addElOptions){
-
$this->getElement($addElOptions[0])->setBelongsTo($subFormName);
-
}
In one move, this creates the element and assigns it to a HTML array of the name $subFormName. Evidently I am using this with sub forms but there is no reason why you should have to do that.
RSS Feed