Hello,

I am trying to create a select box that ends up lookign like this:

<option value="val1">Top Level</option>
<option value="" disabled="disabled"></option>
<option value="val2">* First Child</option>
<option value="val3">* * First Gandchild</option>
<option value="" disabled="disabled"></option>
<option value="val4">* Second Child</option>
<option value="val5">* * First Second Gandchild</option>

I have a recursive function that reads and can build the select elemtn with
html, but then how would I add it to the send_form that I am building.

If i just have the array ($this->_getTreeStrut()) sent to:

                $this->addElement('select', 'parent_structure', array(
                         'label' => 'Parent: ',
                         'id' => 'parent_structure,
                         'isArray' => false,
                         'multiOptions' => $this->_getTreeStrut(),  // this get 
the values and
such for options.
                ) );

I loose all my values. Even if i add the val as the key, how would I add
blank records and disables ones specifically?

The '* ' in the menu labels are being generated by str_repeat iin the
recursive function, which i would like to keep int he final generated
znd_form element.


Is there a way to just send my generated html to an element that can be
included in the Z_form object i am creating?

Thanks.


-- 
View this message in context: 
http://www.nabble.com/Zebd_Form-Select-Element-tp21735298p21735298.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to