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 Profiles (Moderator: Dave Greenberg) »
  • Custom Profile for Event Registration Ability for User to Select Address Type
Pages: [1]

Author Topic: Custom Profile for Event Registration Ability for User to Select Address Type  (Read 3147 times)

seashell

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Custom Profile for Event Registration Ability for User to Select Address Type
February 15, 2010, 10:15:09 am
Creating a custom profile for an event registration form.  Would like to provide the ability for the registrant to select (Address) Work or Home and then collect only the address for the selected address.  Is this possible, would like to ensure when the registrant registers online the "contact" and "individual" record are corrected and the correct address type is updated. 

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Profile for Event Registration Ability for User to Select Address Type
February 15, 2010, 11:15:53 am
I think you'll need to create a custom version of the event registration template (form) to accomplish this. One approach:
 - put in both sets of address fields (Work and Home fields) and hide them when the form loads
 - add a radio button field to the template where user selects 'Home Address' or 'Work Address' - and hook some javascript to this radio button to show the corresponding set of fields
Protect your investment in CiviCRM by  becoming a Member!

ole10

  • Guest
Re: Custom Profile for Event Registration Ability for User to Select Address Type
March 01, 2010, 07:43:16 pm
Hi there,

I’m new to civicrm and need to create dynamic select for event registration based on civicrm profile. I’ve created javascript file for this, but where shall i save my js file and where shall i save the register.tpl for this particular online event registration? ??? 

I would really appreciate any feedback.

Ole

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: Custom Profile for Event Registration Ability for User to Select Address Type
March 01, 2010, 07:51:12 pm

check:

http://wiki.civicrm.org/confluence/display/CRMDOC/Customizing+CiviCRM+Screens

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

ole10

  • Guest
Re: Custom Profile for Event Registration Ability for User to Select Address Type
March 02, 2010, 04:06:32 pm
Thanks for the speedy response lobo!

 Here is what i’ve done but still no result. Not even an error message. :'(

1.   Created custom data set with two drop down selects. Named them projectname( select options are: projecta and projectb) and projectid (with select options 1001 and 1002).
2.   Created civicrm profile that links to the custom fields mentioned above.
3.   Created civicrm event with profile from step2.
4.   Created civicrm_custom directory drupal\civicrm_custom\CRM\Event\Form\10\register.tpl
5.   Added custom directory path under Administer menu
6.   Added drupal_add_js(drupal_get_path('module', 'civicrm') .'/projectid3.js'); to register.tpl to call my js code.
7.   Saved js file under this directory site/civicrm/projectid3.js

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: Custom Profile for Event Registration Ability for User to Select Address Type
March 02, 2010, 04:30:32 pm

1. i would first check the event within civicrm and ensure it meets your needs

2. you've edited the wrong file, the path should b:

templates/CRM/Event/Form/Registration/10/Register.tpl

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

ole10

  • Guest
Re: Custom Profile for Event Registration Ability for User to Select Address Type
March 04, 2010, 07:00:55 pm
Hi Lobo,
Thanks very much for your reply! I’m now getting some test results on the page. However when i’m using
 
drupal_add_js(drupal_get_path('module', 'civicrm') . '/projectid5.js');

It doesn’t seem to call it. Is there any other way to call js file from register.tpl ?  ::)

thanks!!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Custom Profile for Event Registration Ability for User to Select Address Type

This forum was archived on 2017-11-26.