Drop Down List Unable to Pass Value |
[eluser]deliriumfolk[/eluser]
How come when I pass my selected option, it always being seen as 0. Hence does not post the correct value according to what I had selected in the drop down list. What might be amiss that does not allow my controller to post in the correct value? Code: Model Code: Controller Code: View
[eluser]deliriumfolk[/eluser]
Will changing my view to use form_dropdown solve the issue i am having?
[eluser]dnc[/eluser]
What does the view source look like at lines: Code: User Group: <select name="usergroup"> Are all the variables being passed?
[eluser]dnc[/eluser]
Also you can do a var dump instead of the return in your model to be sure the drop down variable value is being passed. Code: Model
[eluser]deliriumfolk[/eluser]
This is what the drop down will display. Code: <select name="usergroup"> This is what it is being pass through. Why is it a Boolean? Code: array (size=6)
[eluser]deliriumfolk[/eluser]
Hey, thanks guys for all your feedback. I got it working. Aken had pointed it out that in my view the select menu has a different name. What change in here is changing the name of the select to groupId. Code: View And in here I changed the form_validation to groupId as well. Code: Controller I believe the following changes allow the correct value from the drop down to pass to the model which is waiting to receive attribute from "groupId". |
Welcome Guest, Not a member yet? Register Sign In |