public function save() { if ($_POST['metaFields:disabled_input'] === 'NO') { // Make sure checkboxes have a value as unchecked values don't appear in $_POST if (!array_key_exists($this->model->object_name . ':for_verification_check', $_POST)) { $_POST[$this->model->object_name . ':for_verification_check'] = '0'; } } parent::save(); }
/** * Override saave to store the applies_to_location field. */ public function save() { if ($_POST['metaFields:disabled_input'] == 'NO') { // Make sure checkboxes have a value. // @todo: If we use Indicia client helper controls for the attribute edit page, this becomes unnecessary if (!array_key_exists($this->model->object_name . ':applies_to_location', $_POST)) { $_POST[$this->model->object_name . ':applies_to_location'] = '0'; } } parent::save(); }