Trying to add the campaign name to my automatic receipts.

This works: {$formValues.campaign_id}

But this doesn't: {$formValues.campaign_name} or {$formValues.campaign_title}

I need to print the campaign name and not id.

How can I add the Campaign name to my receipt


If you can get campaign id ({$formValues.campaign_id}) then you can use api to retrieve the Campaign Title. Use below snippet to get the Title

{if $formValues.campaign_id} 

  {crmAPI var='campaignTitle' entity='Campaign' action='getvalue' sequential=0 return="title" id="`$formValues.campaign_id`"}

Note: The snippet code is not tested but you can use the logic to get the title



  • thanks for the response. I tried this but it prints: Array It seems to work in the API explorer but not in the template
    – Yossi
    Jun 6 '19 at 23:05
  • It does work we need use right variable Jun 7 '19 at 6:54
  • 1
    Updated my answer Jun 7 '19 at 21:14

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.