zend framework - How to present a select type(drop down) in a tree view format in Zend_Form -


In Z, I am doing a new project and it needs to be drop down, which populates data from database (i.e. categories). I need to show the data for those categories shown in the Tree View in the drop-down menu. I have tried a little bit by getting the data from the database and then by using foreach and arranging it in jade END_FORM, put it in the value

  $ category-> AddMultiOption ($ childcategory ['category_title'], $ childcategory ['id']);  

But still I can not find the desired value in the form. Please suggest how to do this because I am very involved in the Zend Framework. A small code snippet will be very helpful in understanding.

Thanks in advance.

I'm not sure what you mean by the tree, but if you opt around the specific option -group, you can use the following multi-option structure:

  $ options = array ('option group name' = & gt; array ('value1' = & Gt; 'Label 1', 'value2' = & gt; 'label2',), 'name of second group' = & gt; array ('value3' = & gt; label 3 ',' value 4 '= & Gt;' label 4 ',),); $ Range & gt; SetMultiOptions ($ option);  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -