Hot answers tagged

2

Some example code if you want to remove certain elements on the contact add and edit forms: /** * Implements hook_civicrm_buildForm(). * * Changes some fields on the add and update contact forms * * @param string $formName * @param CRM_Core_Form $form */ function MODULE_civicrm_buildForm($formName, &$form) { // print_r($formName); if ($...


1

These are all valid options! I never use a custom field for this; I use tags or the contact source field. The "external identifier" field is often useful for this - I'll tag contacts from a certain location with their ID from that source prefaced by an acronym for that source. As someone who works daily with data migrations, I rarely need to do ...


1

Building on Hans Rossel's helpful answer, below are paired PHP and javascript to remove some contact fields when adding or editing contacts. Note there is a WordPress-specific function call to obtain the path to the javascript file, which I assume is stored in the .../plugins/CUSTOMPLUGIN/assets/ folder, with a define('WP_CUSTOMPLUGIN_FILE', __FILE__); ...


Only top voted, non community-wiki answers of a minimum length are eligible