Welcome Guest, Not a member yet? Register   Sign In
Unable to repopulate select box after form submit
#1

[eluser]term25[/eluser]
I have this in my view:

Code:
$options = array(
  'first'  => 'First option',
  'second'    => 'Second option',
  'third'   => 'Third option',
);

echo form_dropdown('what', $options, 'third');

And now always the third option is shown when the fields are repopulating after submit validation error.

I can repopulate input fileds but I am unable to repopulate select dropdown boxes.

How to repopulate them after submit?

I do not want that user get back when he had make a mistake and everything he chose in dropdown selectboxes is missing and he has to set it again.

Thanks in advance for any help.




Theme © iAndrew 2016 - Forum software by © MyBB