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 CiviEvent (Moderator: Yashodha Chaku) »
  • Limiting Custom Data to Only One Event
Pages: [1]

Author Topic: Limiting Custom Data to Only One Event  (Read 1342 times)

jeff porter

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 2
Limiting Custom Data to Only One Event
April 25, 2008, 10:29:42 pm
Curious to know how you can create custom data and limit its use to only one event?  Right now, to have custom registration data for an event we do this:

1. Create custom data group for the data - assign it to participant: Attendee
2. Add fields and as needed
3. Create profile for the same group of data
4. Add custom data fields from that group we created
5. Adding that to CiviEvent

That works fine (if it is the right procedure?).  But, if I pull up a contact and edit their event registration, i see ALL of the custom data groups for all of the events, not just for the one event they registered for.  So, I can't save the information unless I fill in the mandatory fields for each of the data groups.

I am thinking that the work around is to create custom participant types for each event?  (e.g. Attendee-Conference-DC-08) so that only that data shows up for that event?  It seems onerous, but is that the best way to do it?

Jeff
Jeff Porter
Foundation for Prader-Willi Research (www.fpwr.org)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Limiting Custom Data to Only One Event
April 25, 2008, 11:07:58 pm
Hi,

I have a similar concern, and you might find this thread useful:
http://forum.civicrm.org/index.php/topic,2668.0.html

So far, I haven't been annoyed enough to hack the code and we're doing it your way.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Limiting Custom Data to Only One Event
April 25, 2008, 11:28:33 pm
Currently, custom data groups which extend the "Participant" record are either "used for" for "all participants", or for participants with a specific participant role ("Speaker", "Volunteer", etc.).

As you've noted, you can filter these more flexibly for online registration forms based on the Profile(s) you assign them to (and then include in a given Event Reg form). However, you can't filter them for offline registration by Event. Your work-around below will work. However, if you can at least categorize them a bit more generally by role + event type, rather than simply by event - that might be a bit better.

EXAMPLE: If all your Golf Tournament type events require the same set of custom fields, you could have a role of "Attendee - Tournament" (or something like that).
Protect your investment in CiviCRM by  becoming a Member!

jeff porter

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 2
Re: Limiting Custom Data to Only One Event
April 26, 2008, 06:59:51 am
Dave,

Kari and I talked about that last night.  We think for some of our events, that will work fine (especially the ones that are annual).  However, some of them are not the same.  One golf tournament tracks t-shirt size, handicap, whether they want dinner or not, preference of food, etc.  Others do not.  We are trying to figure out how to build more generic profiles for some of those cases, but CiviEvent reg only gives you two profile options (top and bottom), so we need to limit these to 2 per event.

For example, we could create the generic: giving shirts away at the event profile (size, numbers, etc.) as well as the dinner options, and the golf registration options would help, but again I only get two of them. 

Is there a way through code changes to add more than 2 profiles per event?

Thanks

Jeff
Jeff Porter
Foundation for Prader-Willi Research (www.fpwr.org)

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: Limiting Custom Data to Only One Event
April 26, 2008, 12:32:32 pm

You can add more profiles to a page IF you make the relevant code changes. However not sure if this is a good path to go, since it introduces code changes and hence u fork (which means u need to merge for future upgrades etc). The schema allows multiple profiles, so no schema changes are needed.

In case u do want to implement it, some of the files u need to change are:

CRM/Event/Form/ManageEvent/Registration.php (to collect all profiles u want displayed)

CRM/Event/Form/Registration.php
CRM/Event/Form/Registration/*.php

This has come up a few times in the past, i suspect we'll think  about adding this capability in a future 2.x version.

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Limiting Custom Data to Only One Event

This forum was archived on 2017-11-26.