• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form_Dropdown with Blank "Select One..." Option

#8
[eluser]michalsn[/eluser]
Code:
$this->form_validation->set_rules('gender', 'Gender', 'required');
Code:
function get_genders()
{
    return array(
      NULL => 'Select One...',
      'male' => 'Male',
      'female' => 'Female'
    );
}
Code:
echo form_dropdown('gender', $gender_options, set_value('gender', $gender_answer));


Messages In This Thread
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 03:08 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 04:19 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 05:01 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 05:07 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 05:11 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 05:12 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 05:14 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 05:27 AM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-07-2012, 09:36 PM
Form_Dropdown with Blank "Select One..." Option - by El Forum - 08-08-2012, 03:33 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.