I am using an XML config file to tell Zend_Form what elements I want. I would like to have a <select>
element, but I am unsure as to how to add <option>
tags using the XML syntax.
Sure I am missing something pretty basic.
Ben
I am using an XML config file to tell Zend_Form what elements I want. I would like to have a <select>
element, but I am unsure as to how to add <option>
tags using the XML syntax.
Sure I am missing something pretty basic.
Ben
Programmatic forms in the ZF only support the parameters type, name and options (not in the meaning of choices but of element settings, like required or label) for the form elements. It is assumed that multiple values will be set dynamically, e.g:
Of course there's the possibility of actually setting the element options in the XML file using your own name convention (will be ignored by Zend_Form) and then load them from there instead of having the hardcoded or retrieved at runtime, for instance:
Yet it doesn't seem to be more effective than just having those options stored somewhere else.