$value .= ' ' . $params[$key . '_time'];
}
+ // updateBlankCustomInfo flag is false && $value is blank, do not proceed
+ if (!CRM_Utils_Array::value('updateBlankCustomInfo', $params, TRUE) && ($value == '' || !isset($value))) {
+ continue;
+ }
+
$valueId = NULL;
if (CRM_Utils_Array::value('customRecordValues', $params)) {
if (is_array($params['customRecordValues']) && !empty($params['customRecordValues'])) {
* @return void
* @access public
*/
- static function checkRegistration($fields, &$self, $isAdditional = FALSE, $returnContactId = FALSE, $useDedupeRules = FALSE) {
+ static function checkRegistration(&$fields, &$self, $isAdditional = FALSE, $returnContactId = FALSE, $useDedupeRules = FALSE) {
// CRM-3907, skip check for preview registrations
// CRM-4320 participant need to walk wizard
if (!$returnContactId &&
}
}
}
+ if ($contactID) {
+ $fields['updateBlankCustomInfo'] = FALSE;
+ }
}
if ($returnContactId) {
*/
protected $_id;
+ protected $_updateBlankInfos = array();
+
/**
* The group id that we are editing
*
elseif ($form->_isUpdateDupe == 1) {
if (!$form->_id) {
$form->_id = $ids[0];
+ // CRM-10128: flag to ignore empty form fields rather than clearing the existing DB value
+ $form->_updateBlankInfos['updateBlankCustomInfo'] = FALSE;
}
}
else {
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
+ $params = $params + $this->_updateBlankInfos;
//if the delete record button is clicked
if ($this->_deleteButtonName) {