Welcome Guest, Not a member yet? Register   Sign In
set_value() not working (?) when form_validation is loaded
#1

[eluser]SeasonedCoder[/eluser]
I have stumbled upon this strange behavior: if I load form_validation library and do not assign validation rules to some fields, those fields are not re-populated even if set_value() is being called.

Does it mean that I have to assign at least one rule (e.g. 'xss_clean') to each field for them to be re-populated? Or am I missing something?
#2

[eluser]xwero[/eluser]
No you are right, the set_value is connected to the rules you set.
#3

[eluser]Vicente Russo[/eluser]
You can set a blank rule


Code:
$this->form_validation->set_rules('fieldname');
#4

[eluser]SeasonedCoder[/eluser]
Thanks, guys!




Theme © iAndrew 2016 - Forum software by © MyBB