+ // Serialization cannot be changed on update
+ if ($this->_id) {
+ unset($params['serialize']);
+ }
+ elseif (strpos($params['html_type'], 'Select') === 0) {
+ $params['serialize'] = $params['serialize'] ? CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND : 'null';
+ }
+ else {
+ $params['serialize'] = $params['html_type'] == 'CheckBox' ? CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND : 'null';
+ }
+