In my previous post I uploaded a source code called “Populate Dropdown List Using CodeIgniter”. In that sample code, I used the country field to populate the value using the helper function.
This time, I’ll show you on how to populate a birth date field with three separate dropdown list.
Here’s the code to call the helper and populate the array with values from our function:
$this->load->helper('birthdate'); $this->data['birth_date_year'] = buildYearDropdown('birth_date_year', $this->input->post('birth_date_year')); $this->data['birth_date_month'] = buildMonthDropdown('birth
Add new comment