diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 72bd332241c6..cd8e06fb05cf 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -229,7 +229,7 @@ public function preProcess() { } // this was used prior to the cleverer this_>getContactID - unsure now - $this->_userID = CRM_Core_Session::singleton()->get('userID'); + $this->_userID = CRM_Core_Session::singleton()->getLoggedInContactID(); $this->_contactID = $this->_membershipContactID = $this->getContactID(); $this->_mid = NULL; diff --git a/templates/CRM/UF/Form/Fields.tpl b/templates/CRM/UF/Form/Fields.tpl index 7e1b872d07eb..155a936da111 100644 --- a/templates/CRM/UF/Form/Fields.tpl +++ b/templates/CRM/UF/Form/Fields.tpl @@ -2,6 +2,14 @@ {if $field.skipDisplay} {continue} {/if} + + {assign var=profileFieldName value=$field.name} + {if $prefix} + {assign var="formElement" value=$form.$prefix.$profileFieldName} + {else} + {assign var="formElement" value=$form.$profileFieldName} + {/if} + {if $field.groupTitle != $fieldset} {if $fieldset != $zeroField} {if $groupHelpPost && $action neq 4} @@ -26,8 +34,6 @@ {/if} {/if} - {assign var=profileFieldName value=$field.name} - {if $field.field_type eq "Formatting"} {if $action neq 4 && $action neq 1028} {$field.help_pre} @@ -41,19 +47,15 @@ {/if} {if $field.options_per_line != 0}