1

I am having trouble with displaying a custom contribution field on the online reciept.

With the offline receipt, it works great with this:

{crmAPI var='rname' entity='Contribution' action='getvalue' return="custom_134" id=`$formValues.contribution_id`}
{if $rname}<p>Dear {$rname},</p>{else} <p>{contact.email_greeting},</p> {/if}

The same code on the online receipt returns:

Dear array,

How can I fis this?

5

The smarty variables for online and offline may be different for Contribution ID.

For offline

{crmAPI var='rname' entity='Contribution' action='getvalue' return="custom_134" id=`$contributionID`}
{if $rname}<p>Dear {$rname},</p>{else} <p>{contact.email_greeting},</p> {/if}

Online

{crmAPI var='rname' entity='Contribution' action='getvalue' return="custom_134" id=`$contributionID`}
{if $rname}<p>Dear {$rname},</p>{else} <p>{contact.email_greeting},</p> {/if}
1
  • THanks, I switched the id to id=$contributionID and it worked
    – Yossi
    Jul 16 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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