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) »
  • Auto-filling event registration profile when logged in
Pages: [1]

Author Topic: Auto-filling event registration profile when logged in  (Read 1476 times)

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Auto-filling event registration profile when logged in
November 07, 2012, 03:58:21 am
Hi,

I've set up an event with a profile for registration fields displayed below the standard e-mail-field.

Is there any way I can make the system fill out the profile fields automatically when the member is logged in?

Thank you,

leupi

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 2
Re: Auto-filling event registration profile when logged in
November 07, 2012, 05:10:03 am
Not trying to hijack your thread but I'm having what I think is the same issue. I built a form for an event and many of the people that are registering already have CiviCRM contacts. If they do have a contact I would like to see that info pre-populate the form fields if they are logged in rather than have them need to fill out all of the information all over again. Especially if they registered for a previous event as they would have filled out an almost identical form last year.

Is this currently possible? Having your personal information pre-populate the form if you already have a CiviCRM contact record with us?

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Auto-filling event registration profile when logged in
November 07, 2012, 06:07:49 am
Gensmann:

What is in your profile? Is it standard contact info such as name, address, phone? If so, then pre-filling of the profile should happen for logged in users provided the field location_type in the profile is the same as the location_type the info is stored in.

Eg if phone numbers in you database are stored in location_type = home-phone then you need to specify home-phone as the location_type in your profile.

If you are trying to display information you collected for a previous event such as dietary requirements that is stored in custom fields then whether or not the info will pre-fill depends on how you set up the custom data fields for the previous event.  If you set the fields up as contact data then the pre-filling should happen.  If you set the fields up as 'participant' data then it won't pre-fill.

(If you have custom participant fields you can get the pre-fill to work if you create a set of duplicate 'contact' fields , export the custom participant info and then re-import into the newly created 'contact' fields, but that might not be feasible if you have a lot of contacts or a lot of custom fields.)


Leupi:

When you say "built a form" I am assuming you mean an event registration page in civi with profiles for collecting the information.  If so then the answer above applies to your situation also.


gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Auto-filling event registration profile when logged in
November 09, 2012, 03:10:11 am
Hi jchester, thanks for taking your time to reply.

EDIT: My apologies. It seems to be a mismatch between locations. Thank you for your help.

My profile has fields of type Individual, Organization, Contact and Membership. Some of the fields are custom fields.
Only the e-mail required by default by the event is filled out, not even the standard First Name from Individual.
The locations match the data entered (home) in my test case.

Do you have any ideas as to what I'm missing?

These are the fields:
Membership number
Individual Prefix *
Job Title *
First Name *
Middle Name
Last Name *
Company/Organisation *
Department
Street Address *
Additional Address
Postal Code *
City *
Country *
Phone *

Thanks.
« Last Edit: November 09, 2012, 04:17:59 am by gensmann »

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: Auto-filling event registration profile when logged in
November 09, 2012, 11:42:32 am
Can you confirm that logged in people are seeing 'any' profiles filled in? If not check Permissions.
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

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Auto-filling event registration profile when logged in
November 19, 2012, 04:40:44 am
Hi Petednz,

Thanks for asking. I have one issue left: The internal contact ID is the only field that is not pre-filled.

Can you point me to where I check the permissions if that's what's causing the problem?

Thanks,

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: Auto-filling event registration profile when logged in
November 19, 2012, 10:50:05 am
Hi Genzmann - think I am losing track on this issue - can you post some screenshots - not sure how you are getting a Profile on an Event that is showing Membership fields - so reluctant to hazard a guess about Contact ID - but can' recall ever including that in a Profile since users obviously can't edit it - i presume it is only to be there as a read-only field?
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

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Auto-filling event registration profile when logged in
November 23, 2012, 03:24:53 am
Hi petednz (and everybody else)

I've attached a screenshot of the registration form for the event including some of the profile fields and the definition of the profile field that is causing me problems.

What I would like to do is display the field "Internal Contact ID" on the form. I can use it in mailings by using the {contact.contact_id} tag, but I'm unable to display it on the event registration form.

Any idea why?

Thanks.
« Last Edit: November 23, 2012, 03:27:41 am by gensmann »

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: Auto-filling event registration profile when logged in
November 23, 2012, 08:52:00 am

You;ll need to make code modifications to add that field.

However, i dont think adding that field is a good ideato an even reg page since thats an internal mysql generated number

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

gensmann

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.66
  • PHP version: 5.3.2
Re: Auto-filling event registration profile when logged in
November 23, 2012, 09:32:31 am
Hi lobo, thanks for replying.

My issue is that my client has been using that number as their membership ID, hence all members use this number when they sign up for events - also when they are handled by partner's sign-up systems - so I really would like to be able to display (not edit) it.

Can you point me to the dev. manual where I might find the needed documentation to make the code modification? Or do you recommend a different approach like exporting the current contact_ids and importing them into a new field, using this instead?
I'd still need to make modifications to populate this field automatically when a new contact is created though. And I'd need to implement a tag for mail templates so they can include this new field in mailings.

Thanks.

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: Auto-filling event registration profile when logged in
November 23, 2012, 06:28:03 pm

The dev book is at: http://book.civicrm.org/developer/

You should read the chapter on hooks and templates since you can do most of the below via this mechanism. If you have specific questions / stuck on something, do ask on irc

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) »
  • Auto-filling event registration profile when logged in

This forum was archived on 2017-11-26.