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) »
  • Using profile to create sub-contact type from Drupal user register form
Pages: [1]

Author Topic: Using profile to create sub-contact type from Drupal user register form  (Read 1542 times)

andyrp

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
    • White Fuse Media
  • CiviCRM version: Various
  • CMS version: Drupal
  • MySQL version: Various
  • PHP version: 5.2/3
Using profile to create sub-contact type from Drupal user register form
September 03, 2012, 04:31:49 am
Civi 4.1.0
Drupal 7.14
I'm a relative Civi newbie.

Trying to use the /user/register page in Drupal to create a sub-contact type ('student') in Civi. I have set up the profile so that it creates a contact as a student and tested it as a standalone profile. However, when I add this to the Drupal user register form the contact is created as an Individual rather than as the subcontact type student.

Strangely, when I installed modal forms Drupal module (which opens the registration page in a shadowbox above whatever page the user is currently on) and registered a new user the profile worked correctly and created the sub-contact student. However, there was a separate issue with modal forms conflicting somehow with the profile and often just giving a spinning wheel so have had to turn that off!

Any help much appreciated. Thanks
« Last Edit: September 03, 2012, 04:34:12 am by arpearson »
Andy Pearson
White Fuse Media

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: Using profile to create sub-contact type from Drupal user register form
September 03, 2012, 11:00:27 am

might want to upgrade to the latest version of 4.1.x or better yet 4.2.0 and see if it is still happening there. I do remember some contact-type issues being fixed in more recent releases

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

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: Using profile to create sub-contact type from Drupal user register form
September 20, 2012, 02:28:45 pm
We have had success with this, thanks lobo.  Is there anyway to limit the selectable subcontact type options to the public?  For example we have subcontact types A-D in the system, but we only want to allow the public to choose A or B type, how can this be achieved?  I looked into jquery but without classes or ids in the select list Im not sure how to approach this...

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: Using profile to create sub-contact type from Drupal user register form
September 21, 2012, 02:21:43 am

can you look at the contact subtype code and modify it as needed to add the required classes to the html elements

if u need help getting started ping us 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

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: Using profile to create sub-contact type from Drupal user register form
September 25, 2012, 05:15:33 pm
Great thanks Lobo!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Using profile to create sub-contact type from Drupal user register form

This forum was archived on 2017-11-26.