CodeIgniter Forums
Disabled dropdown - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Disabled dropdown (/showthread.php?tid=45840)



Disabled dropdown - El Forum - 10-08-2011

[eluser]scherman[/eluser]
Hi, here is my problem.
I have a custom function i've created for render an html dropdown:

Code:
function form_dropdown_action($action, $name, $dato, $array_info, $data) {
  switch($action)
  {
   case 'clean':
    $value = '';
    break;
   case 'edit':
    $value = $dato;
    break;
   case 'repopulate':
    $value = set_value($name);
    break;
   case 'disable':
    $value = $dato;
    $array_info['disabled'] = 'disabled';
    break;
  }
     return form_dropdown($array_info, $data, $value);
}

It works fine except by the 'disable' status.
When the $action is 'disable', it would disable the dropdown. But it doesn't work.

I hope you can help me.

Thanks!