From: Jitendra Purohit Date: Fri, 1 Nov 2019 12:20:48 +0000 (+0530) Subject: Fix loading of profile fields on additional participant form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=60b661acd98497514980679f178362cb46f83234;p=civicrm-core.git Fix loading of profile fields on additional participant form --- diff --git a/CRM/Event/Form/Registration/AdditionalParticipant.php b/CRM/Event/Form/Registration/AdditionalParticipant.php index 7e9eb11c5e..fcc96e9130 100644 --- a/CRM/Event/Form/Registration/AdditionalParticipant.php +++ b/CRM/Event/Form/Registration/AdditionalParticipant.php @@ -178,8 +178,14 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R CRM_Event_Form_Registration_Register::buildAmount($this); } + //Add pre and post profiles on the form. + foreach (['pre', 'post'] as $keys) { + if (isset($this->_values['additional_custom_' . $keys . '_id'])) { + $this->buildCustom($this->_values['additional_custom_' . $keys . '_id'], 'additionalCustom' . ucfirst($keys)); + } + } + //add buttons - $js = NULL; if ($this->isLastParticipant(TRUE) && empty($this->_values['event']['is_monetary'])) { $this->submitOnce = TRUE; }