Body: <p>I've been trying to get my custom contribution fields to be visible in my thank you/receipt message template and I think I am close but not quite there.</p>
  
  <p>I have enabled the CIVICRM_MAIL_SMARTY flag in civicrm.settings.php and used the following capture 
      {capture assign=test}{contribution.custom_5}{/capture}
  to retrieve the field per the following instructions:<br>
      <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates</a> but no luck (value is not getting returned) :/</p>
  
  <p>There also seems to be an approach to build an extension or use the Tokens and TokenValues Hooks and API generated code but I am stuck on how to do this given it's a custom contribution field used on a multiple contribution (grouped by contact) thank you.</p>
  
  <p>This seems like a very standard request so thought maybe someone out there has already built this!?!?</p>
  
  <p>Any guidance or insight would be greatly appreciated!
  Thanks, Karen</p>
  
  <p>P.S. Most of the installs I would like to do this for are running WP 4.6.x or 4.7.x and CiviCRM 4.6.x.  Is this feature more readily available in CiviCRM 4.7.x?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-14T18:27:19.087Z
Comments.Text: Thanks for your post.  It would be helpful if you could add your version of CiviCRM and CMS (e.g. WordPress, Drupal or Joomla).  The answers may vary depending on this.
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-20T21:44:14.787Z
Comments.Text: Did you ever figure this out? I am having the same issue
Comments.UserDisplayName: Yossi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-01T14:17:57.170Z
Comments.Text: Possible duplicate of [Display the payment vehicle (cash, check,...) of a contribution in a receipt](https://civicrm.stackexchange.com/questions/28588/display-the-payment-vehicle-cash-check-of-a-contribution-in-a-receipt)
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civicontribute><custom-fields><tokens><message-templates><smarty>
Title: Custom Contribution Fields in Message Templates
ThreadText: # Custom Contribution Fields in Message Templates
  
  (Asked by: username_0 on 2016-12-14)
  
  I've been trying to get my custom contribution fields to be visible in my thank you/receipt message template and I think I am close but not quite there.
  
  I have enabled the CIVICRM\_MAIL\_SMARTY flag in civicrm.settings.php and used the following capture
  {capture assign=test}{contribution.custom\_5}{/capture}
  to retrieve the field per the following instructions:  
  <https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates> but no luck (value is not getting returned) :/
  
  There also seems to be an approach to build an extension or use the Tokens and TokenValues Hooks and API generated code but I am stuck on how to do this given it's a custom contribution field used on a multiple contribution (grouped by contact) thank you.
  
  This seems like a very standard request so thought maybe someone out there has already built this!?!?
  
  Any guidance or insight would be greatly appreciated!
  Thanks, username_0
  
  P.S. Most of the installs I would like to do this for are running WP 4.6.x or 4.7.x and CiviCRM 4.6.x. Is this feature more readily available in CiviCRM 4.7.x?
  
  **Tags:** civicontribute, custom-fields, tokens, message-templates, smarty
  
  > **Comments:**
  > **username_1**: Thanks for your post.  It would be helpful if you could add your version of CiviCRM and CMS (e.g. WordPress, Drupal or Joomla).  The answers may vary depending on this.  
  > **username_2**: Did you ever figure this out? I am having the same issue  
  > **username_3**: Possible duplicate of [Display the payment vehicle (cash, check,...) of a contribution in a receipt](https://civicrm.stackexchange.com/questions/28588/display-the-payment-vehicle-cash-check-of-a-contribution-in-a-receipt)  
  
  ---
  
  ## 0 answers
  
  