Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1594

Associate PHP Code with Custom Data Group

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Current thinking is that we might do this with a hook, OR store PHP code associated with a "group" of custom fields in the database.

      — original post ----
      It would be astoundingly helpful to implement a custom data type that is "php code". Much in the same way that we can ask drupal to display blocks according to whether a set of php code returns true or false, we could have php code that returns a value and CiviCRM would fill in the value of that custom field with the value returned by the function. This would be especially useful if various variables and functions relating to the contact where available to the php code.

      For myself, I would love to create a php snippet that automatically assigns a members home constituency based on their primary address.

      Thanks!

      Patrick Hayes

        Attachments

          Activity

            People

            • Assignee:
              deepak Deepak Srivastava
              Reporter:
              phayes Patrick Hayes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: