CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Tokens for Civi Contribute custom fields
Pages: [1]

Author Topic: Tokens for Civi Contribute custom fields  (Read 975 times)

kestermuller

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: CiviCRM 4.4.6.
  • CMS version: Wordpress 3.4.2.
  • MySQL version: 5.5.21-
  • PHP version: 5.4
Tokens for Civi Contribute custom fields
February 10, 2015, 05:56:23 am
Hi all,

We're trying to use a custom field that is created against the individual donation as a way of inserting custom text into a contribution thank you letter. I tried to create the token and it's drawing a blank. I figured it would be called "{contribution.custom_178}" as 178 is the ID of the custom field, but that's not working. We've done word replacement to change 'Contribution' to 'Donation', but this shouldn't affect the custom field nomenclature.

What obvious thing am I doing wrong?

Thanks,
K

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Tokens for Civi Contribute custom fields
February 24, 2015, 05:32:01 pm
Any contribution custom fields are not available (yet) in Civi as tokens that I am aware of.

This blog addresses the custom programming required for this:
https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit
« Last Edit: February 24, 2015, 05:36:47 pm by CiviTeacher.com »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

kestermuller

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: CiviCRM 4.4.6.
  • CMS version: Wordpress 3.4.2.
  • MySQL version: 5.5.21-
  • PHP version: 5.4
Re: Tokens for Civi Contribute custom fields
February 25, 2015, 07:41:57 am
Hi there! Thanks so much for your advice. What a shame though, hey? It would be really nice if all custom fields were accessible automatically as tokens, because of course what's the point in creating the custom data if you can't put it to use?  :P

Will look into making my own!

Thanks again, Kester

flo81

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
  • CiviCRM version: 4.5.8
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.40
  • PHP version: 5.4
Re: Tokens for Civi Contribute custom fields
April 01, 2015, 02:50:32 am
Hi,

Did you manage to add contributions custom fields as tokens available in "send letters" action ? I'm trying to achieve this, but I'm stuck in hook_civicrm_tokenValues, where it seems I can't get contributions ids (only contacts ids). My logic would be to add my custom field value as a token for all contributions by making a DB request.

Thanks

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Tokens for Civi Contribute custom fields

This forum was archived on 2017-11-26.