home | contact us
» zend framework » Zend Framework Form HTML Array Notation

BLOG CATEGORY: zend framework


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){
        call_user_func_array(array($this,'addElement'), $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.


Click Here to Contact Us about Zend Framework Form HTML Array Notation
 

Comments

Comments Off

Comments are closed.

rss icon