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) »
  • E-mail and Location type
Pages: [1]

Author Topic: E-mail and Location type  (Read 1154 times)

ccowens

  • Guest
E-mail and Location type
April 10, 2010, 12:58:48 pm
Why do e-mail addresses have a "location type" associated with them? 

It would seem that the typical use of "location type" would be to describe physical locations, e.g. "home", "office", "summer house", "shipping address", etc.

It makes sense for Addresses to have a location type, and (sort of) for telephone numbers, but I don't see the same logic with e-mail addresses. 

Does anyone's implementation use location types with e-mail addresses?

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: E-mail and Location type
April 10, 2010, 01:39:51 pm
It's not uncommon for organizations to track a business and personal email address, i.e. work and home, for people. You could argue that there's not a perfect correlation to the list of location options, which are used for email/phone/addresses. But some degree of classification along those lines is useful, and I'm not sure there'd be much benefit in creating a new option list type when the existing location list seems to suite the purpose and retains some consistency across the different fields.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

ccowens

  • Guest
Re: E-mail and Location type
April 11, 2010, 10:18:33 am
I'm working on an application for a summer sports program - a lot of the parents have winter and summer addresses.  Every time we ask them to enter or edit an e-mail address or a cell phone number, they are prompted for a location type.  This confuses people, and if they do enter more than one e-mail address I then have some cleanup to do when I produce the directory, etc.

The conditions I want to impose are:  

  • A Household may have a phone number but not an e-mail address.  e-mail addresses belong to individuals.
  • An Individual may have an e-mail address, but we do not allow an associated location type for that e-mail address -- behind the covers we just force it to 'Main' or 'Primary' or some such.
  • The phone number belonging to a Household can have an associated location type of 'Winter', 'Summer', etc. but there is no option to enter a phone type of cell, main, fax, etc. -- behind the scenes we force it to 'main'
  • The phone number belonging to an Individual is forced behind the scenes to "mobile" - we do not allow the choice of "fax", "voicemail", etc. The location associated with that phone number is forced behind the scenes to 'Main' or 'Primary' - we do not allow the choice of 'Winter', 'Summer', etc.

I believe the right place for me to manipulate all of this is in Contact/Form/Contact.php

Thoughts?  Advice?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: E-mail and Location type
April 11, 2010, 01:35:40 pm
I'm a bit confused about this - if you select the location type for the field when you create the profile the user has no choice & you can choose 'primary' for example
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

ccowens

  • Guest
Re: E-mail and Location type
April 11, 2010, 05:27:31 pm
Quote from: Eileen on April 11, 2010, 01:35:40 pm
I'm a bit confused about this - if you select the location type for the field when you create the profile the user has no choice & you can choose 'primary' for example

Me too.   I see there is a built-in profile called "New Household", with Profile ID 6, that contains only the fields "Household Name" and "Email".   But when I select "New Household" under the "Contacts" menu, I land on
Code: [Select]
<site>/civicrm/contact/add&reset=1&ct=Household, which brings up a  (very nice but not what I want) form with subparts for Contact Details, Custom Data, Address, Communications Preferences, etc.... it appears to be controlled by
Code: [Select]
Contact/Form/Contact.php and
Code: [Select]
Contact/Form/Contact.tpl.

How can I force the creation of a new household to use a profile that I choose?  (I know that I can create a link to my profile, but what if the creation of a new household is invoked by some other means?)


lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: E-mail and Location type
April 12, 2010, 04:09:18 am
The new household profile is used for new contact records created while creating a related record. For example, you can choose to register a participant directly from the menu. The first field let's you select the contact who is registering. If you type a name not in the system, the 'new individual' profile will appear so you can complete basic fields for the creation of a new individual. The concept is to have only basic required fields for these 'on the fly' contact creation forms.

But when you click 'new household' or indiv/org, you are entering the complete contact creation form. And you are doing so as an administrator.

Eileen's question is that if you are collecting information from end users, you typically do that through profile create/edit forms in which you can specify exactly what types of phone records you want to collect (e.g. home-phone, home-mobile, work-phone).

It sounds like you are letting parents get into the administrative backend of civicrm, where the full range of tools are exposed (and consequently are more complex). I'm not sure your workflow, but typically only admins and staff would have access to those tools. You would only want to expose very simple profiles (collections of fields) to end users.

You may want to review the collecting and sharing data chapter from the online book to better understand the concepts:
http://en.flossmanuals.net/CiviCRM/CapturingExposing
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

ccowens

  • Guest
Re: E-mail and Location type
April 14, 2010, 08:22:03 am
Quote from: lcdweb on April 12, 2010, 04:09:18 am

It sounds like you are letting parents get into the administrative backend of civicrm, where the full range of tools are exposed (and consequently are more complex). I'm not sure your workflow, but typically only admins and staff would have access to those tools. You would only want to expose very simple profiles (collections of fields) to end users.


Not exactly, but you're on the right track:  I have a very simple end-user interface based on profiles;  I was looking for a middle ground - something for temp admins, volunteers in the office, etc.... something that would expose much more functionality without leading to confusion, given that we don't have the resources to train these people.

I think I've accomplished what I need with profiles, though.  Thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • E-mail and Location type

This forum was archived on 2017-11-26.