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) »
  • how to add a custom field to contribution?
Pages: [1]

Author Topic: how to add a custom field to contribution?  (Read 1091 times)

webguy2

  • Guest
how to add a custom field to contribution?
September 18, 2009, 07:12:15 am
Member fee includes a fee based on the number of properties they operate.  I need that included in the join renew form and reflected in the contribution record viewable from the contact contribution tab records.

I've been in php/mysql for a while but do not know how to do this in CiviCRM.  I've posted a similar request in Civicontribute hoping it would not involve custom programming but no one replied, so I post here.

Any ideas?  Please be as specific as possible as to which pages and what, in general, to do.

Many thanks!

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: how to add a custom field to contribution?
September 18, 2009, 08:07:15 am

you can potentially do this in 3.0 using the membershipTypes hook

check:

http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmmembershipTypeValues

This hook is invoked for all membership registration / renew pages. For detailed tutorials on hooks, you might want to check drupal's documentation and examples in the civicrm distribution.

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

webguy2

  • Guest
Re: how to add a custom field to contribution?
September 18, 2009, 08:31:41 am
thanks lobo - so this is only for 3.0 and not earlier versions?

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: how to add a custom field to contribution?
September 18, 2009, 09:03:17 am

yes, that hook was introduced in 3.0

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • how to add a custom field to contribution?

This forum was archived on 2017-11-26.