[eluser]NachoF[/eluser]
Im trying to have a value already selected when the user comes inside a form cause it is an edit form.
Code:
$options = array(
'0' => 'Low',
'1' => 'Medum',
'2' => 'High',
);
echo $task->priority;
echo form_dropdown('priority',$options,$task->priority)?>
As you can see Im echoing the default value just to make sure Im getting it right.. and I am, the value gets printed out right before the dropdown, but the dropdown doesnt use that default value... yet if I try
Code:
$options = array(
'0' => 'Low',
'1' => 'Medum',
'2' => 'High',
);
echo form_dropdown('priority',$options,2)?>
It does put High as already selected... we cant use variables in the helper or what?
$task->priority is just a value that I get from database.. if it makes a difference its set to ' character(20)" in the database... I didnt create it so I cant change it. another app dependes on the same databse.