![]() |
Help - Validate & Repopulate a Dropdown? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Help - Validate & Repopulate a Dropdown? (/showthread.php?tid=10649) |
Help - Validate & Repopulate a Dropdown? - El Forum - 08-07-2008 [eluser]hawthornpublications[/eluser] I've used the form_dropdown function to generate a dropdown menu using an array of options. After the form fails validation, I want the dropdown to maintain the selection but can't figure out how to do it. Code: $meals = array( In the form_dropdown function I have the default currently set to Code: 'select_one' Code: $this->validation->meals Any ideas? ![]() Help - Validate & Repopulate a Dropdown? - El Forum - 08-07-2008 [eluser]hawthornpublications[/eluser] Wait. I tried it again and it worked. Nevermind - thanks all! Help - Validate & Repopulate a Dropdown? - El Forum - 08-18-2008 [eluser]hawthornpublications[/eluser] Here is a more detailed explanation. View File Code: // Set menu options Controller Code: $fields['fruit'] = "Fruit Options"; Help - Validate & Repopulate a Dropdown? - El Forum - 08-18-2008 [eluser]The Wizard[/eluser] Hello ![]() code Help - Validate & Repopulate a Dropdown? - El Forum - 08-18-2008 [eluser]The Wizard[/eluser] Code: .. $this->validation->code ); |