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 CiviMember (Moderator: Deepak Srivastava) »
  • Collecting Data on an Organization during the Membership signup process
Pages: [1]

Author Topic: Collecting Data on an Organization during the Membership signup process  (Read 4993 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Collecting Data on an Organization during the Membership signup process
July 12, 2009, 11:18:34 am
I wish to collect data on an Organization during the membership process (online contribution form for membership) where a person signs up "on behalf of" an Organization in addition to the default Org info like Org address, phone etc.

Example:

"Company product or service" TEXTFIELD
"Number of employees" INTEGER

I can include a Profile in the form containing Contact custom data, but it is always inserted into the "on behalf of" Individual not the Organization itself.

How can I change this behavior in the form, so the data is inserted (associated with)  the Organization not the Individual signing on behalf of?

Does this get back to the whole "Org fields not allowed in Registration profiles" or if the desired fields are of type "Contact" can they be redirected to the Org not the Individual?  Also if a Profile contains required fields that are only applicable to a Org (but are coded as Contact fields because they need to be on the reg form), how can I not have these fields show up when you View/Edit an Individual?

« Last Edit: July 12, 2009, 11:42:56 am by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Collecting Data on an Organization during the Membership signup process
July 12, 2009, 11:38:21 am

as mentioned in a previous post, you will need to do this via a post process hook (if u want to do it cleanly). else u'll need to hack the php files

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Collecting Data on an Organization during the Membership signup process
July 12, 2009, 12:00:17 pm
Ok thanks I've got my work cut out for me thanks.

Forgive my ignorance, but it appears that hooks are used primarily for creating custom Modules that utilize CiviCRM functionality.  I have made a fairly robust Drupal 6 module before, but I don't really need to make a new module here I don't think.   Or is that what you are saying?  If anything it seems I'd want to simply redirect the data insert to the Org not the Individual.

I'm sorry but when you say "use hooks to do X" that doesn't mean a great deal to me.  Again I apologize for my ignorance, but there is a large gap between what I want to do and what I understand about CiviCRM, despite working with it on and off for over a year now.  You have the benefit of coding CiviCRM for a lot longer than I do and in greater depth so please understand that certain things seem more intuitive to you than they do to others.

I have read your hook specification here:
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification

It references a "sample application" here: http://svn.civicrm.org/civicrm/trunk/drupal/civitest.module.sample

But that sample application uses no "hook_civicrm" at all.

So where would I go to see any example of these hooks in action, can you please please please give me a little more to go on?

Thanks, I appreciate it
Stoob
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Collecting Data on an Organization during the Membership signup process
July 12, 2009, 12:12:24 pm

i described the steps u need to do here:

http://forum.civicrm.org/index.php/topic,6727.msg37981.html#msg37981

check:

http://svn.civicrm.org/tools/trunk/drupal/modules/multicurrency/multicurrency.module

for a module that implements multi-currency support in civicrm via hooks. It implements the buildForm and postProcess hooks (in addition to a few others)

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Collecting Data on an Organization during the Membership signup process
July 12, 2009, 12:14:03 pm
Thank you, a working example was what I needed.

Thank you for your help.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Collecting Data on an Organization during the Membership signup process
July 12, 2009, 12:18:56 pm

in general for coding questions etc, pinging us on IRC might be more efficient and faster :) So please use that channel if we are around.

That said, i'm about to log off and go to the park with the kids, i dont think anyone else is around :)

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Collecting Data on an Organization during the Membership signup process
August 04, 2009, 02:22:31 pm
Thanks to Lobo and Kurund.

I have posted a comprehensive "how to" cookbook on collecting organizational data through the membership application process by editing the PHP and TPL files.

http://wiki.civicrm.org/confluence/display/CRMDOC/Enhance+Organizational+Membership+Functionality

This how-to contains not only special SQL queries to create permissioned relationships but code examples and specific instructions on how to add more fields to "Organization Details" on the form.
« Last Edit: August 04, 2009, 03:08:58 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Collecting Data on an Organization during the Membership signup process
August 30, 2009, 06:55:44 pm
Okay - so I have cooked up the recipe, but seem to have left out the baking powder - the result is that upon signing up the process all seems happy but the outcome is that I am not getting any data recorded in my fields.

Second question - what have you offered by way of enabling the 'authorised contacts' the ability to update/edit custom data fields - presumably this should be via the Contact Dashboard for Permissioned Relationships - maybe I have gone around the circle too often and forgotten where this conversation got to.
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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Collecting Data on an Organization during the Membership signup process
May 12, 2010, 03:46:01 pm
This link is no longer valid and I can't find the document I wrote anywhere.

http://wiki.civicrm.org/confluence/display/CRMDOC/Enhance+Organizational+Membership+Functionality

Was it deleted on purpose or by accident?

Is there now a better way to collect custom Organization fields during "on behalf of" membership signups?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Collecting Data on an Organization during the Membership signup process
May 12, 2010, 03:54:31 pm

check:

http://wiki.civicrm.org/confluence/display/CRMDOC22/Enhance+Organizational+Membership+Functionality

i suspect it got dropped behind due to the way confluence versioning works (not the greatest, IMO)

if this still works for 3.1, you should consider updating the instructions and posting on the 3.2 wiki (the 3.1 space is frozen to prevent mistakes)

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

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Collecting Data on an Organization during the Membership signup process
May 12, 2010, 05:18:58 pm
The original docs were for a 2.2.8.  Unfortunately the site that needs this work is not on 3.1 yet.  But it might be someday.  If/when that comes to pass I will be sure to update the docs where applicable, thanks.
« Last Edit: May 12, 2010, 05:20:34 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

johng

  • Guest
Re: Collecting Data on an Organization during the Membership signup process
May 12, 2010, 08:12:24 pm
Hi, as you are the original author of my inspiration for attempting to do similar perhaps you could offer some input on the post I made about this: http://forum.civicrm.org/index.php/topic,13750.0.html

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: Collecting Data on an Organization during the Membership signup process
May 12, 2010, 11:29:38 pm
Our deployment of Stoob's solution as I fondly refer to it, was on a 3.x - probably can't help with much by way of details but if Eileen can remember anything that tripped us up I will ask her to post
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Collecting Data on an Organization during the Membership signup process

This forum was archived on 2017-11-26.