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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Data Fields, conditionally?
Pages: [1]

Author Topic: Custom Data Fields, conditionally?  (Read 1453 times)

forrestrae

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal 7
  • MySQL version: 5.1.54
  • PHP version: 5.3.5-1ubuntu7.2
Custom Data Fields, conditionally?
December 18, 2011, 01:49:17 pm
Hi Everyone,

First off, thanks for such an amazing piece of software!

Goal: Track board of director contacts of our organization, and allow custom data fields (position,biography) to be modifiable by the b.o.d. user accounts.  Finally, display this information on our website using Views.

A little background about my installation and us:  We are a community organization that represents a group of kiteboarders and fights for improved access to the Columbia River.  We are using CiviCRM to track our members.  We have a board of directors, and this is also tracked via a contact having the "Director of" relationship to our organization contact.

After creation of a user account in Drupal, I would like to allow users who's contact record includes a "Director of" relationship to our organization to be able to modify a set of Custom Data Fields which include a biography and name of their position.  I tried creating a profile, but I can't seem to add this "relationship based" custom data to a profile.

Am I even going about this in the right way?

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: Custom Data Fields, conditionally?
December 18, 2011, 11:20:08 pm
Yes, you are following the correct route in my opinion. You should be able to add the custom data to your profile if you attached it to contact, but to be able to check the relationship I think you will have to do a little customization. Do you have any PHP skills or anyone around you that has some?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

forrestrae

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal 7
  • MySQL version: 5.1.54
  • PHP version: 5.3.5-1ubuntu7.2
Re: Custom Data Fields, conditionally?
December 19, 2011, 08:28:39 am
Great, good to know I'm going in the right direction.  Yea, I can code in just about any language, just trying to avoid it unless I really had too.  :)  I imagine I need to write a form hook of some kind?  Can you point me in the right direction?  Whatever I get working, I'll post back here for archival reasons.

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: Custom Data Fields, conditionally?
December 19, 2011, 12:31:10 pm
You would possibly use the buildForm hook to show additional data on your profile, and add the fields to the template as well....depends on what you want. A list of hooks can be found here: http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+hook+specification and the developer guide can be found here http://book.civicrm.org/developer/.
Good luck, and let me know if you need any additional help  ;)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Custom Data Fields, conditionally?
January 04, 2012, 11:05:59 am
Why not use the webform_civicrm module to build your form the easy way?
You could limit access to the form using roles, permissions, and optionally the group-roles sync module to automate it. Too bad it can't do smart groups, so you'd need to put your board members in a dumb-group for this to work.
Try asking your question on the new CiviCRM help site.

forrestrae

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal 7
  • MySQL version: 5.1.54
  • PHP version: 5.3.5-1ubuntu7.2
Re: Custom Data Fields, conditionally?
January 04, 2012, 11:45:10 am
After spending two weeks writing custom code for another problem I had, I discovered views, webforms...

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Custom Data Fields, conditionally?
January 04, 2012, 12:12:15 pm
Another Drupal success story! Makes me feel sorry for joomla and wordpress users.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Data Fields, conditionally?

This forum was archived on 2017-11-26.