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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Custom Field Pre Hook
Pages: [1]

Author Topic: Custom Field Pre Hook  (Read 1397 times)

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Custom Field Pre Hook
August 15, 2011, 07:54:03 am
Stemming from this discussion:
http://forum.civicrm.org/index.php/topic,21152.0.html

It would be great to have a _custom_pre hook that enables some additional code to be run on change of a custom field.

Right now, the _pre hook doesn't get triggered on custom field changes, and the _custom hook is only run after the changes have been committed and provides no way of knowing exactly what was changed (as far as I can tell). Changes to the existing _custom hook might suffice if it was able to let us know which field within a custom group was changed.

Thoughts?

Brian

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Custom Field Pre Hook
February 12, 2012, 08:32:46 am
I found a way around this. I'm not a programmer, so it is a bit of a hack job, but if anyone is interested it allows you to see the previous values of all fields inside the custom group that has been changed inside of the hook_civicrm_custom.

http://issues.civicrm.org/jira/browse/CRM-9649

It would be great if this was tidied up and found its way into core.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Custom Field Pre Hook

This forum was archived on 2017-11-26.