CodeIgniter Forums
getting the selected value in a dropdown list - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: getting the selected value in a dropdown list (/thread-19001.html)



getting the selected value in a dropdown list - El Forum - 05-24-2009

[eluser]Unknown[/eluser]
In my view form, I have a dropdown list with values.

I want to pass the selected value of the user to the controller.

form_input() have this in the controller:

$this->input->post('name');

is there a counterpart for the form_dropdown() , wherein it can access the selected value from the view file?


getting the selected value in a dropdown list - El Forum - 05-24-2009

[eluser]Thorpe Obazee[/eluser]
It uses the same method, $this->input->post('field_name')