public function getValue($name) { $res = parent::getValue($name); if ($name == 'actions' && isset($res['dates'])) { // Convert old format to new format foreach ($res['dates'] as $fieldid => $note) { $res['fields']['custom_' . $fieldid] = array('value' => "-1==={$note}", 'add' => true); } unset($res['dates']); } return $res; }