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) »
  • Contact editing from front end
Pages: [1]

Author Topic: Contact editing from front end  (Read 1124 times)

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Contact editing from front end
November 28, 2012, 08:27:37 am
Okay, maybe it's just my day to have a complete brain lapse here but profile use in Drupal My Account screen is great, except that you can only use fields fron the "Individual" contact type. So I need a way to have a page for editing address and phone number and so forth.  What have others done to address this need?  I tried to create a profile as a standalone form with the fields but that doesn't pre-populate with the current values of the contact/user account currently logged in.  Maybe I am just missing a concept here or something cause I feel dumb asking this question.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact editing from front end
November 28, 2012, 12:17:13 pm
You should also be able to include 'Contact' fields in that profile (e.g. phone, street address etc.).
Protect your investment in CiviCRM by  becoming a Member!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Contact editing from front end
November 28, 2012, 01:24:31 pm
I am able to include any "contact" related field instead of just "individual" (note: update admin book to change that, pg. 150 toward bottom of page) but it doesn't let me edit them which turns out to be a good thing for my org but may not be for others.  I have all fields set to just User and Admin rather than public, which I assume should be enough for editing?  I am running 4.2.2 so this may be fixed in 4.2.6.  Thanks DAVE!!!
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact editing from front end
November 28, 2012, 01:44:30 pm
You should be able to edit profile fields - as shown on Demo at http://drupal.demo.civicrm.org/user#overlay=user/1/edit/Name%2520and%2520Address
Protect your investment in CiviCRM by  becoming a Member!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Contact editing from front end
November 29, 2012, 07:37:19 am
I think I understand now. We heavily use Shared Address functionality which is why most fields can't be edited rather than them being contact fields. Just happen to have both scenarios to test this with.  Now the question is with a relationship set so that the person can edit the attached organization's record, why does it not allow editing at that point within the same My Account screens?  Maybe it is coded to only handle shared values as read only?  Seems like this would be a useful scenario but maybe I am missing the reason why not.  If not how would a user get to an organization record from their own dashboard/account screen where there was a relationship and permissioned edit rights?
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Contact editing from front end
November 29, 2012, 08:09:45 am
Also another interesting note that I'm not sure is system wide or related to drupal account and using profiles is that if there are multiple profiles with the same name the one with the smallest ID is selected instead of the one with the correct ID.  Further testing is needed to qualify this as a bug but pretty easy to reproduce with profiles.

Profile A with ID = 1
label same as Profile B
Drupal Registration check box
Current Employer is editable.

Profile B with ID = 2
Drupal View/Edit check box
Current Employer is View Only

Result is that Profile A is used rather than Profile B.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Contact editing from front end
November 29, 2012, 11:24:00 am
I need to blog about the extension that allows you to set things so that anyone who has a Permissioned Relationship (eg to their Org) can edit that Contact properly - not sure if that will help you - not sure when I will do the blog either - sorry - that may not seem so helpful now I write it
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact editing from front end
November 29, 2012, 02:14:21 pm
Quote from: NASACT on November 29, 2012, 08:09:45 am
Also another interesting note that I'm not sure is system wide or related to drupal account and using profiles is that if there are multiple profiles with the same name the one with the smallest ID is selected instead of the one with the correct ID.  Further testing is needed to qualify this as a bug but pretty easy to reproduce with profiles.

Profile A with ID = 1
label same as Profile B
Drupal Registration check box
Current Employer is editable.

Profile B with ID = 2
Drupal View/Edit check box
Current Employer is View Only

Result is that Profile A is used rather than Profile B.

Not sure how this can happen since the linkages in civicrm_uf_join utilize the primary key of the profile (civicrm_uf_join.uf_group_id FK to civicrm_uf_join.id). Would be helpful if you could dump those tables and investigate what's happening.
Protect your investment in CiviCRM by  becoming a Member!

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: Contact editing from front end
November 29, 2012, 07:04:46 pm

pretty sure that in D6 and D7, drupal sends in the label of the profile and we do a lookup from label to id (not normally done)

Would be good if you can trace that code and find/fix that issue there. In general having two profile with exactly the same label seems like an edge case

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

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Contact editing from front end
November 30, 2012, 08:33:50 am
Welll our case for it was that we wanted to be congruent with things but once a user/contact record is created we manually attach shared addresses at which point we don't want the individual user changing most of their fields else the loss of relationships and organizations being created under different names.  Since our membership for the most part is at the org level the relationships and shared addresses help to keep the data centrally managed.  Therefore, we try and use "contact info" profiles for registration and view/edit and others separate but still have the same name as to not confuse the user.  I have changed the labels so they are close but not the same.  This keeps those fields as view only in all other places but initial account creation process.  If that helps to understand the use case of same profile label names and association to the Drupal Account areas.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Contact editing from front end
November 30, 2012, 08:37:12 am
@petednz I will have look through extensions to see what I can find about the permissioned relationships and editing contact info for those as that helps me greatly allowing one person in each organization to edit the shared addresses and thus updating all the rest at the same time, which makes life really nice.  If you have time to blog a bit, maybe at high level about this that would be much appreciated.

Thanks to Dave and Lobo for the explanation of the lookup that explains why you can't have multiple profiles with the same name with regards to Drupal User Account items.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Contact editing from front end

This forum was archived on 2017-11-26.