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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Greetings Field - Where is it?
Pages: [1]

Author Topic: Custom Greetings Field - Where is it?  (Read 2262 times)

LanceD

  • Guest
Custom Greetings Field - Where is it?
April 21, 2008, 05:18:45 pm
I imported a batch of contacts into CiviCRM and they all included custom greetings.  All of those custom greetings are in my db, but I can't find a place in CiviCRM where you can view or edit those custom greetings.  Where is the editable "Custom Greeting" field?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Greetings Field - Where is it?
April 21, 2008, 06:42:28 pm
Go into a contact & choose 'edit'. In the first section 'name & greeting' there are 3 lines. In the second line on the right is 'Greeting'
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

LanceD

  • Guest
Re: Custom Greetings Field - Where is it?
April 22, 2008, 07:59:58 pm
Eileen,  thanks for your help but that's not the field I'm talking about.  If you import a batch of contacts, you can import custom greetings as well.  Those are in my database, but not showing when I edit the contact.  The Greeting field is actually a greeting type - not the custom greeting itself.

So what's happening to that custom greeting?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Greetings Field - Where is it?
April 23, 2008, 02:30:36 am

I suspect this is a case where we do allow folks to import it, but then we dont use/display the information.

we need to figure out how/what/when to use the greeting_type and custom_greeting fields. Seems like we dont do anything with those fields now. Any recommendations or thoughts on this?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Greetings Field - Where is it?
April 23, 2008, 10:56:17 pm
Although we don't expose it in the user interface, you can Export it from any contact search (using "Select fields for export"). Since one expected use case for this field is for mail-merge - the fact that you can export the field might be helpful.
Protect your investment in CiviCRM by  becoming a Member!

LanceD

  • Guest
Re: Custom Greetings Field - Where is it?
April 26, 2008, 12:19:30 pm
Yes... Dave, that's exactly what my customer would need it for - mail merges.  It's not so much that we'd need it for other aspects of CiviCRM, though I could see it benefitting CiviMail in the same way.   The biggest concern is just that it needs to be exposed in the interface so that non-profits can enter and manage that data along with the rest of the contact data.  Does that make sense?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Greetings Field - Where is it?
April 26, 2008, 03:13:40 pm
Yes, that makes sense. Please file an issue in the issue tracker for 2.1 to add this field to the Add / Edit Individual form.
Protect your investment in CiviCRM by  becoming a Member!

LanceD

  • Guest
Re: Custom Greetings Field - Where is it?
April 28, 2008, 06:01:21 pm
This has been done - CRM-3036.  Incidentally, which files would I have to edit to do this myself?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Greetings Field - Where is it?
April 29, 2008, 02:52:07 pm
For adding it to the form, start with CRM/Contact/Form/Edit.php and define the field. You may need to modify CRM_Contact_BAO_Contact::retrieve to grab the value of this column (might do it already?). Then modify or create a custom version of templates/CRM/Contact/Form/Edit.tpl to display your new field.

For viewing the contact, you'll work with templates/CRM/Contact/Page/View/Tabbed.tpl - enable smartyDebug to see if the field value is already available to the template. If not, you'll have to modify the underlying code to retrieve it.

Probably get on IRC if you get stuck. AND review the CiviCRM Architecture thread on the blog before starting w/ this.
Protect your investment in CiviCRM by  becoming a Member!

LanceD

  • Guest
Re: Custom Greetings Field - Where is it?
April 29, 2008, 10:20:52 pm
Thanks, Dave.  For the most part, this turned out to be easy.  I've updated the code for Individuals without issue.  I did run into a slight problem with Households and Organizations, though.  Not suprisingly, that field isn't being returned by the default query for organizations and households.  I did read through the Architecture blog, but for some reason the file containing the query that returns that data seems to be eluding me.  Do you happen to know where I should look to modify the return data from the organization and household queries?  Specifically, I'm just concerned about the Edit screens.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Greetings Field - Where is it?
April 30, 2008, 01:03:15 pm

I assume u r referring to CiviCRM 2.0

i just checked the queries being generated and we retrieve ALL the contact data from civicrm_contact table, so it should be there. i did a debug for a household entity and did see it

The code that retrieves the default values is in CRM/Contact/BAO/Contact.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Greetings Field - Where is it?

This forum was archived on 2017-11-26.