Welcome Guest, Not a member yet? Register   Sign In
blank option for dropdowns
#1

[eluser]Mithun[/eluser]
How can i add a default blank option for dropdowns using form_dropdown() other than specifying it each time in $options array?
#2

[eluser]jmadsen[/eluser]
form_dropdown()is a function in a helper. These are not objects, so you can't really extend them like modles, controllers, etc.

So the easiest would probably be to make your own "wrapper" class that would accept your form_dropdown values, prepend a "" to $options array, and then pass it on to the form_dropdown().


This will explain better
http://ellislab.com/codeigniter/user-gui...lpers.html




Theme © iAndrew 2016 - Forum software by © MyBB