Welcome Guest, Not a member yet? Register   Sign In
set_value | set_select | etc. works only with rule applied on its element
#2

[eluser]mddd[/eluser]
If I remember correctly, set_value takes its information from the validation library. And the validation library only works on the fields it knows about (that is: fields that have some kind of rules attached to them).

So the solution is:
1. put all fields in your validation configuration, even if the don't need rules to check them.
or
2. manually set the right value with set_value('fieldname', $my_value);
Here, $my_value allows you to set your own value if there is no value set for 'fieldname' trough the validation library. You could set $my_value to $this->input->post('fieldname') to pick up the posted information, even if it is not validated: set_value('fieldname', $this->input->post('fieldname');

BUT: generally, it is a good idea to validate any fields coming from the user. Even if you're not applying rules but just checking them for xss injection.


Messages In This Thread
set_value | set_select | etc. works only with rule applied on its element - by El Forum - 06-09-2010, 10:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB