Modifying a form value in form_fields() doesn't get saved
Hi,
I simply want to use htmlspecialchars_decode on the content field value before the form is rendered, though this does not work:
function form_fields($values)
{
$fields = parent::form_fields($values);
if(!empty($values['content'])) {
$fields['content']['value'] = htmlspecialchars_decode($values['content']);
}
return $fields;
}
I need to do this as when I save a bunch of HTML in a field, it gets removed. How can I stop this from happening?
Thanks!
Comments
$fields['content']['pre_process'] = 'htmlspecialchars_decode';