Suppose if I have two fields in my form viz first_name and last_name
I have set the validation rule only for first_name.
set_value should work for both the fields regardless of rule ? right ?
For me it works only for the fields which have rules with them !!!
set_value only works against the items you have chosen to validate using the form_validation class.
Easiest way is to pretend you are validating by adding this to your form validation config
array(
'field' => 'address1',
'label' => '',
'rules' => ''
),
There is a hack someone has done to the CI library but I haven't been able to find the documentation on that today...Or use this modification instead: