How to populate a dropdown from result_array |
01-13-2015, 02:26 PM
(This post was last modified: 01-13-2015, 02:26 PM by ivantcholakov. Edit Reason: Fixing a name )
It would be better within Contacts_model a special method public function dropdown() { ... } to be created. In this special method it is not necessary all the fields to be retrieved, 'id' and 'names' are enough.
Code: public function dropdown() { And then the dropdown in the view will become: Code: echo form_dropdown( |
Messages In This Thread |
How to populate a dropdown from result_array - by andyblem - 01-12-2015, 11:59 PM
RE: How to populate a dropdown from result_array - by Avenirer - 01-13-2015, 02:23 AM
RE: How to populate a dropdown from result_array - by andyblem - 01-13-2015, 03:58 AM
RE: How to populate a dropdown from result_array - by ivantcholakov - 01-13-2015, 02:32 AM
RE: How to populate a dropdown from result_array - by Rufnex - 01-13-2015, 01:24 PM
RE: How to populate a dropdown from result_array - by andyblem - 01-15-2015, 12:59 AM
RE: How to populate a dropdown from result_array - by ivantcholakov - 01-13-2015, 01:52 PM
RE: How to populate a dropdown from result_array - by ivantcholakov - 01-13-2015, 02:26 PM
RE: How to populate a dropdown from result_array - by CroNiX - 01-21-2015, 02:02 PM
|