CodeIgniter Forums

Full Version: Preselection not working for dropdown
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]zulubanslee[/eluser]
I have a dropdown and here is the code
Code:
echo form_dropdown('selectcategory', $category_array, $selected_category);


$selected_category is outputting the variable I want, the html looks like it should, but the page always loads with the first item selected.

Here is the html
http://imgur.com/mbiNR