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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • custom fields tokens for memebership
Pages: [1]

Author Topic: custom fields tokens for memebership  (Read 766 times)

jeevajoy

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: joomal 1.6
  • MySQL version: 5
  • PHP version: 5
custom fields tokens for memebership
November 17, 2011, 09:03:52 am
Hi,

I tried to bring all the custom fields used for membership to  custom token.

In civicrm_tokenValues function, i used API to acess the memebership details using contact id and managed to get and  assing values to the tokens.
Its getting values
But custom fields  having select option like Languages where users defined its just prints the number instead of the particular language

    [custom_7] => 6

    [custom_9] => 5

    [custom_13] => london[text field]

in [custom_7] it should print English instead of 6.

Any suggestions.

Cheers,
Jeeva
   

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: custom fields tokens for memebership
November 17, 2011, 10:10:07 am

I tried to take a look around and could not find an easy way to do it via the API. For the short term i suspect your best bet might be to get the label directly from the DB (its stored in the option value table)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jeevajoy

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: joomal 1.6
  • MySQL version: 5
  • PHP version: 5
Re: custom fields tokens for memebership
November 18, 2011, 01:19:14 am
Thanks


Jeeva.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • custom fields tokens for memebership

This forum was archived on 2017-11-26.