diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 0399436fd8c1..a0992ef2ae3c 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -574,9 +574,16 @@ public function assignToTemplate() { } $this->assignPaymentFields(); - $this->assign('email', - $this->controller->exportValue('Main', "email-{$this->_bltID}") - ); + if ($this->_emailExists && empty($this->_params["email-{$this->_bltID}"])) { + foreach ($this->_params as $key => $val) { + if (substr($key, 0, 6) == 'email-') { + $this->assign('email', $this->_params[$key]); + } + } + } + else { + $this->assign('email', $this->_params["email-{$this->_bltID}"]); + } // also assign the receipt_text if (isset($this->_values['receipt_text'])) {