5

I am trying to generate a profile that lists and allows the user to edit his employment/education history in their Drupal My account page. I was hoping to get something similar to what is described in:

http://wiki.civicrm.org/confluence/display/CRM/Multiple-record+Custom+Data+Sets+in+Profiles

The issue is that I have no idea how to do it. I tried Views, but that one does not allow data editing. I also tried advanced search but I don't know how to limit the search results to the contacts related to the current user.

Any help/advice will be very appreciated.

4 Answers 4

2

Interesting question. I was about to launch in to my usual - do this with either webforms, or Views, CiviEntities, VBO etc but knowing that the VBO interface is not 'great' for general users I wondered what could be done via multiple record fields and profiles.

You hadn't specified if you were thinking of using Civi Relationships, though the word is in the subject. But I don't think civi can give a user access to edit their own relationships particularly easily.

A Webform could be the solution since it does allow you to manage your start / end date etc so may be worth exploring more.

ANyhow, on demo site (which will of course be refreshed within 24 hours and lose this set up) I set up a multiple record field set with 2 types of 'employer fields' in case Contact Reference would be an option too (seems not from my testing based on the existing permissions for 'demo')

http://d46.demo.civicrm.org/civicrm/admin/custom/group/field?reset=1&action=browse&gid=8

There is also a profile set up with this used for View/Edit

So now if you go to

http://d46.demo.civicrm.org/user/2/edit/Employment_History_16

you will see the fields, and the user can Edit and Add new records to these fields.

Not sure how close this gets to answering your question since it does not use the Current Employer field, and does not use civicrm Relationships.

But i thought I would go down this route as I need to familiarise myself with what is now possible with multiple record fields in the newer versions. ;-)

Also noting that the Contact Reference field works fine in the civicrm tab on the contact record eg for http://d46.demo.civicrm.org/civicrm/contact/view?reset=1&cid=202 but not when it is used in a Profile which may be a well known limitation but just mentioning it here in case it might just be permissions or less likely a regression

1

Multiple record fields have some limitations in profiles, so am not sure if exposing them to Drupal user account will work.

You might want to check out CiviHR: http://hrmaster.demo.civicrm.org/

which also tackles some of these issues and you could potentially reuse some of the extensions built for that

0

You want to create a profile (Administer menu > Customize data and screens > Profiles) and create a profile with the fields you want. Then go into the Settings for that profile and check off "View/Edit Drupal User Account". Users should be able to edit the data on that profile by going to http://example.org/user/edit.

0

"View/Edit Drupal User Account" sort of works. My observations:

  • The multiple record needs to be in a profile by it self, adding it with other fields makes the multiple records field disappear

  • After adding a record, user is thanked with no way to get back to the list, other than going to account and editing again.

  • Clicking cancel gives an error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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