Automated US State dropdown - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Automated US State dropdown (/showthread.php?tid=18275) |
Automated US State dropdown - El Forum - 04-30-2009 [eluser]Iverson[/eluser] I got tired of recreating a dropdown so I made a view that I can just include in my application. You can use the following variables: Code: <?php This can easily be ported into a plugin or helper but I just didn't feel like it at the current moment Automated US State dropdown - El Forum - 02-18-2010 [eluser]PurdueKenny[/eluser] Hey, thanks for this! Makes my life much easier; however, I'm getting an error saying that the element(); function is not found. Specifically on line 40 $select_open = '<select id="' . $id . '" name="' . $name . '"' . element('', $selected, '') . $class; Did I need to do something that I haven't done yet? Automated US State dropdown - El Forum - 02-19-2010 [eluser]Iverson[/eluser] All you need to do is load the array helper. http://ellislab.com/codeigniter/user-guide/helpers/array_helper.html Automated US State dropdown - El Forum - 03-09-2010 [eluser]gscharlemann[/eluser] Thanks for putting this together. You saved me a bunch of time. I noticed the setting: Code: $config['multiple'] = FALSE; |