From: Jon Goldberg Date: Sat, 13 Jan 2024 20:11:44 +0000 (-0500) Subject: restore custom fields for contact subtypes on create X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bdac3c21c627a37cf664d8064b42b1fee6de4dbf;p=civicrm-core.git restore custom fields for contact subtypes on create --- diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index d9059f9391..8c9106715c 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -364,7 +364,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { // the buildForm adds the contact_sub_type to the form we need to look in _submitValues for it - submitValues // is a un-sanitised version of what is in the form submission (_POST) whereas `getSubmittedValues()` retrieves // 'allowed' POSTED values - ie values which match available fields, with some localization handling. - CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->isSubmitted() ? ($this->_submitValues['contact_sub_type'] ?? []) : $this->getContactValue('contact_sub_type'), + CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->isSubmitted() ? ($this->_submitValues['contact_sub_type'] ?? []) : $this->getContactValue('contact_sub_type') ?? $this->_contactSubType, 1, $this->_contactType, $this->getContactID() ); $this->assign('customValueCount', $this->_customValueCount);