Welcome Guest, Not a member yet? Register   Sign In
Can't get set_select() to work
#6

[eluser]EddieX[/eluser]
Today I have done some more debugging and it seems that the "set_value()" in the view returns an empty string. It works just fine for textbox/textareas.

I tried the following:

In the view it looks like this (where the options are fetched from db, but that should not matter).
Code:
<select name="role">
   <option value="1" >Administrator</option>
   <option value="2" >User</option>
</select>

When the view is loaded I expicitly print the value:
Code:
echo("DEBUG:".set_value('role'));
I also print the value from the POST-variable which actually has a value when the form is submitted but the set_value('role') always returns an empty string.

The actual output from the view is:
Code:
role=1 DEBUG:
where role=X is put there by the controller.

Does this mean that there are a problem with select-tag and set_value(), or what do you think?


Messages In This Thread
Can't get set_select() to work - by El Forum - 05-21-2009, 11:53 AM
Can't get set_select() to work - by El Forum - 05-21-2009, 12:05 PM
Can't get set_select() to work - by El Forum - 05-21-2009, 12:05 PM
Can't get set_select() to work - by El Forum - 05-21-2009, 12:30 PM
Can't get set_select() to work - by El Forum - 05-21-2009, 07:44 PM
Can't get set_select() to work - by El Forum - 05-22-2009, 03:37 AM
Can't get set_select() to work - by El Forum - 05-22-2009, 08:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB