![]() |
Validation : set_fields : default value [FIX] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Validation : set_fields : default value [FIX] (/showthread.php?tid=12140) |
Validation : set_fields : default value [FIX] - El Forum - 10-07-2008 [eluser]Brant[/eluser] When setting fields with preset data the validation is not populated in the validation fields. I was able to fix this by extending the CI_Validation class. Please note the line in MY_Validation. Quote:$new_value = (!empty($val)) ? $val : ''; @MY_Validation Code: /** @my_controller Code: $fields = array(); @view/update Code: <table class="datagrid" cellspacing="1" cellpadding="5"> I'm not sure if this is because I'm also using the form helpers or not? |