i have a form that uses a drop down and im using codeigniter , form helper and form validation so when i get a validation error in my form , all the correctly entered fields
The correct method to use set_select()
is
So Andras Ratz method/answer won't work.
Your method is correct.
However remember that set_value()
is only going to return the value if you have setup a validation rule for it, in your case for mid
. You could try as below -
or just set a validation rule for mid
too