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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Select Group in Profile form
Pages: [1]

Author Topic: Select Group in Profile form  (Read 1429 times)

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Select Group in Profile form
October 13, 2009, 05:23:40 pm
I would like to create a profile form that includes a field which allows the user to select from a list of existing groups.  These groups exist in both drupal and in civi (via og_sync).  Is this possible? 

Thanks,
Maria

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Select Group in Profile form
October 14, 2009, 09:52:17 am
From "New Profile Field", select Contacts => Group(s) as the Field Name. This will expose a set of checkboxes with all "Public" visibility Groups where Group type = Mailing List. If you have CiviMail enabled, you will need to include an Email address field in the profile as well since joining mailing list groups requires double-optin by default. You can disable this requirement by adding a setting to your CiviCRM settings file (civicrm.settings.php):

define( 'CIVICRM_PROFILE_DOUBLE_OPTIN' , 0 );
Protect your investment in CiviCRM by  becoming a Member!

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Select Group in Profile form
October 14, 2009, 10:23:14 am
1.  I can't believe I missed such an obvious selection as "Group(s)".  Perhaps an even more obvious name should be considered..., like "Gatherings of users into what we typically describe, in modern parlance, to those who are paying attention, as 'groups'".  The length alone would have tipped me off.

sorry, punchy this morning.

2.  Thank you for the extra tid-bit about disabling the double opt-in.  That saved me some time and frustration.

thanks!
Maria

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Select Group in Profile form
October 14, 2009, 10:32:04 am
Hmm...it appears it was not as clear as I thought.

I disable the double optin, selected Contacts > Groups, and saved the field in the profile.  I was anticipating a drop-down of mailing-list group names. 

Instead, I have a completely empty field, except for the field-help text.  Nothing shows up.  This doesn't seem quite right.

I tested by removing the double optin from settings, adding an email field, and saving the group field again.  Still, no go. 

Ideas?
m

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Select Group in Profile form
October 14, 2009, 12:02:44 pm
From Manage Groups - make sure your groups have Visibility = Public Pages and Group Type = Mailing List.
Protect your investment in CiviCRM by  becoming a Member!

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Select Group in Profile form
October 14, 2009, 04:00:06 pm
Dave, thanks again. 

Follow up question: is there a way to make this a collapsible field, or a dropdown select list?  I have A LOT of groups.  Not a big deal, just a way to make it a bit more user friendly for people submitting information.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Select Group in Profile form
October 14, 2009, 10:25:50 pm
Not without code changes. Note that a drop-down would only allow one selection.
Protect your investment in CiviCRM by  becoming a Member!

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Select Group in Profile form
October 15, 2009, 01:21:31 pm
When you say "code changes" this means in the civi code itself?  not a .tpl file?  In this particular case, i actually do want a single selection.

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: Select Group in Profile form
October 15, 2009, 03:53:25 pm
yes, this would be a code change in the core code itself

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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Select Group in Profile form

This forum was archived on 2017-11-26.