0

I would like to display the address fields found in the contact summary tab (I'm thinking this is the inline location) in the new activities screen. Would also like for the fields to be editable as well. The reason for wanting it to display in both locations is because users are reading off a script in the new activity. Address is the one of the pieces of information gathered/confirmed. Is this possible? All help appreciated. We prefer to have one location for the demographic information so it will be easier to use. We are using Drupal-7.41 and CiviCRM-4.6.6 Thanks for the help.

  • 1
    Hi! Can you please edit your question to clarify whether you mean in the "New Activities" screen, or the "Activities" tab of a contact? Also, if you mention your CMS, folks can suggest better ways of accomplishing what you're trying to achieve. – Jon G - Megaphone Tech Jun 15 '16 at 0:51
1

Like Jon G suggested a little more information would help a lot, I am now assuming I understand what you mean but I do not really :-)

Obviously it is possible to place the address on the activity form (I am assuming you mean the form of the activity when you click 'edit'/'view'? But you can not do this from the UI, you will need to do some customization.

My way would be to write a little extension and use the CiviCRM buildForm hook to add the address on the list of form variables, and add a little jQuery to the template (using CRM_Core_Region::instance('page-body')->add(array('template' => 'yourtemplatewithjQuery.tpl'). This answer assumes you are familiar with PHP and jQuery and with concepts like CiviCRM extensions and hooks. If you are not, the place to start would be the CiviCRM Documentation at http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Documentation.

ALternative would be to add jQuery to your own .tpl, retrieve the Contact Address with the CRM.api3 function and then display the address. Example of the CRM.api3:

CRM.api3('Contact', 'get', params).done(function(result) {
         <your function>
        })

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.