What's the best approach to translate zero/one boolean value to yes/no when loading a record
I have a boolean field called remain_anonymous and it returns as either a zero or one value. it's set to displayonly in form_fields within its model, however, I'd like it to translate the values to yes/no. What's the best approach to this? Where do you suggest I translate the values?
function form_fields($values = array())
{
$fields = parent::form_fields($values);
$fields['remain_anonymous']['displayonly'] = TRUE;
}
Comments
$CI =& get_instance(); $CI->load->helper('general'); $fields['remain_anonymous'] = array('displayonly' => TRUE, 'pre_process' => 'readable_boolean');