Kexiao Liao wrote:
Are there any classes in the Zend Framework which can create the Dropdown
list automatically from the control vocabulary shored in the DataBase
tables? One example of the dropdown list shown below:
<select style='width:300px;' id="hx_smoke" name="hx_smoke" size="1" >
<option value="No" selected >No </option><br/><option value=".A"
Not Applicable to this Case or Patient</option><br/><option value=".F"
Not Found in Chart/No Response to Follow-up</option><br/><option value=".L"
Lost Chart/Lost to Follow-up</option><br/><option value=".P" >Pending
Data</option><br/><option value=".R" >Not Recorded in Chart or Follow-up
Response</option><br/>
</select>
The contents of the above option part come from the control vocabulary
stored in a database table.
The view helper class Zend_View_Helper_FormSelect can achieve this for you.
http://framework.zend.com/apidoc/core/Zend_View/Helper/Zend_View_Helper_FormSelect.html
Regards
Graham