Welcome Guest, Not a member yet? Register   Sign In
Selected Option from a drop down list passed to controller with post
#1

[eluser]GabrieleMartino[/eluser]
Hi,

I would like to know if there is a way to pass data to a function in a controller that is not the id of the field but the selected item text.

Thanks
#2

[eluser]boltsabre[/eluser]
PHP will only pass the value of an input (mapped to the inputs name) via the $_POST variable.

If you need the id, the class, the text of a select option, the value of an attribute (ie, width or height), etc, you'll need to pass it via AJAX.




Theme © iAndrew 2016 - Forum software by © MyBB