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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Adding fields to (or moving fields into) contact's Communication Preferences
Pages: [1]

Author Topic: Adding fields to (or moving fields into) contact's Communication Preferences  (Read 398 times)

DaveFF

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 5
  • Developer at Future First
    • Future First
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.5
  • PHP version: 5.3
Adding fields to (or moving fields into) contact's Communication Preferences
May 07, 2014, 09:27:15 am
I'm quite new to Civi development, and I'm currently developing an extension to add "do not contact until" options, following demand from within the organisation. For example, a contact might say that they have nothing they can do for us right now, but we can call them back in 6 months. When the 6 months is up, their 'Do not phone' preference will be automatically disabled by a scheduled job.

I have created a set of custom fields with dates for each 'Do not' option. Following this post I have used jQuery in Contact.extra.tpl to move them into the 'Communication Preferences' section on the civicrm/contact/add form.

The corresponding changes to the civicrm/contact/view form appear more complicated. Creating a CommunicationPreferences.extra.tpl appears to have no effect, CommunicationPreferences.tpl being included directly from Summary.tpl. Then there is the change between the inline page part and the inline form part when someone clicks 'Edit communication preferences'.

How do I make my custom fields appear in the existing 'Communication Preferences' on civicrm/contact/view? Or am I approaching this completely wrong?
Do Not Contact Until extension: https://civicrm.org/extensions/do-not-contact-until
Organisation Name De-duplicator extension: https://civicrm.org/extensions/organisation-name-de-duplicator

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Adding fields to (or moving fields into) contact's Communication Preferences
May 07, 2014, 11:23:43 pm
You probably need to add them to a Summary.extra.tpl? And for the click inline edit you probably need CRM/Contact/Inline/CommunicationPreferences.tpl
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Adding fields to (or moving fields into) contact's Communication Preferences

This forum was archived on 2017-11-26.