Form Helper : form_dropdown() |
[eluser]Lima[/eluser]
How can I produce dropdown box with form helper form_dropdown() like below : Code: <select name="foo"> Item with value="0" has no group.
[eluser]bretticus[/eluser]
If there was an option to do opt groups, it'd be in the manual. So I really doubt you can make form_dropdown() do this. I'd suggest writing your own helper (you can use that same function from the form helper as a template) or extending the form helper (see "Extending" Helpers.) EDIT: Okay, well I started second guessing myself so I went and actually read the manual: Quote:If the array passed as $options is a multidimensional array, form_dropdown() will produce an <optgroup> with the array key as the label.
[eluser]Lima[/eluser]
Thanks bretticus I know now, it needs array like this : Code: $data = array( CI is rock
[eluser]miss_amylee[/eluser]
how to get back d value chosed from d drop down to d next page..sorry, im new in CI..
[eluser]saidai jagan[/eluser]
you will get htat value using the post method while submitting the form |
Welcome Guest, Not a member yet? Register Sign In |