My CiviCRM 5.16. When I try to add fields to receipt template, I discovered that I could add {$line.contribution_id} which shows the record ID of the contribution. But adding {$line.creditnote_id} (which is also a field in table civicrm_contribution) shows nothing.

How can I know (or change) the data fields that are available for me to show on the receipts?

Thank you.

1 Answer 1


In the message template, put this in the <body> section of the html format section and then send yourself a contribution receipt.

<table id="table_assigned_vars">
    {section name=vars loop=$_debug_keys}
        <tr class="{cycle values="odd,even"}">

This does basically the same thing as using {debug} in regular smarty templates to see the variables in the UI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.