Serious question - the most popular answer will most likely make it onto one. Think hard, people, and feel free to make other thoughts and suggestions too...

migrated from civicrm.stackexchange.com Sep 3 '15 at 2:11

This question came from our site for administrators and users of the CiviCRM Constituent Relationship Management software.


Trying to think of a clever play on the api syntax. Maybe

civicrm_api('Community', 'Create')

or else

civicrm_api('Scout', 'Fetch')

or maybe

civicrm_api('Warm_Beer', 'Get')
  • you meant to type civicrm_api3, didn't you ;) – Xavier Sep 8 '15 at 8:06
  • civicrm_api3('Warm Beer', 'Get'); is my favorite! – Joe Murray Jan 12 '16 at 22:04
    $result = civicrm_api3('Contact', 'get', $params);

or maybe

civix generate:sandwich
try {
  return self::_invoke($args);
catch (Exception $e) {

I would love to add some hooks reference like below -

function my_custom_civicrm_buildForm($formName, &$form) {

  // since the $form object was passed by reference, modifying it here will change it permanently

  $form->assign('intro_text', ts('hello world'));


Probably wayyyyyy too late, but seems like something along these lines should be in the running:

civicrm/CRM/Contact/BAO/Query.php: // IF(civicrm_contribution.contribution_status_id = 1, total_amount, 0 ) as total_completed,

// Fixme: dear god why? these come out in a format that is NOT the name of the fields.
  foreach ($nameFields as &$fix) {
    $fix = str_replace(' ', '_', strtolower($fix));
    if ($fix == 'prefix' || $fix == 'suffix') {
      // God, why god?
      $fix .= '_id';

Extract from https://github.com/civicrm/civicrm-core/blob/1e7702fee94c891c1c1b3ec4d43688991f96b6af/CRM/Contact/Form/Edit/Individual.php

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .