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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • hook to use buildForm on price sets
Pages: [1]

Author Topic: hook to use buildForm on price sets  (Read 1724 times)

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
hook to use buildForm on price sets
May 27, 2009, 04:58:19 am
Hi,

An organisation runs a certain type of event that they want to charge for based on three bits of custom data (organisational income, membership status and sector).

My approach is to define a price set with a radio box that can be used to store the different event fees for this type of event, and then call some custom code to suggest / enforce the correct option when that price set is in use.

I'm customising the form CRM_Event_Form_Participant which contains the Price set radio box but am unsure what functions to call to change the available options.

Something tells me I could/should be using buildAmount, but what I like about my approach is that it lets the site admins use price set to adjust fees.

Let me know what you think about this approach and if it makes sense, how I can limit the available options in the price set.

Thanks for your suggestions :)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • hook to use buildForm on price sets

This forum was archived on 2017-11-26.