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) »
  • Automated email to be sent upon joining a group?
Pages: 1 [2]

Author Topic: Automated email to be sent upon joining a group?  (Read 2478 times)

narragansett

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.41
  • PHP version: 5.3.2-1
Re: Automated email to be sent upon joining a group?
October 23, 2011, 02:29:47 pm
Quote from: colemanw on October 23, 2011, 01:33:12 pm
If the field is not inside a fieldset, you don't need the first bracket. You would just use
%value[civicrm_first_name]

If the field is inside a fieldset, click the edit button and get the key of that fieldset and put it in the first bracket, like the example says. The webform module lets you create as many fieldsets as you want, and even put them inside each other, so to get a value from a field inside a fieldset that's inside another fieldset, use:
%value[key_of_outer_set][key_of_inner_set][key_of_your_field]

However, you are using version 1 of the webform_civicrm module, so before you go any farther, I suggest you download the latest 2.x-dev version and run update.php. This will save you the trouble of having to alter these tokens in the future. After you upgrade, the correct token will be:
%value[civicrm_1_contact_1_contact_first_name]
(unless it is inside a fieldset, see above.)

Ahhh, and the problem is identified!

I was assuming that the various values inside the brackets were being pulled directly from the Civi database - now I see they are all being pulled from the webform Field Keys.  Don't I feel dumb now...

I did a little testing and I was able to successfully pull the First, Middle & Last name data (all from within a fieldset), as well as whether or not my test account knows anything about Drupal (from a nested fieldset).  Looks like I understand it now and should be able to make the email as "pretty" as possible.

I won't be able to update the module until tomorrow some time.  To confirm, after the update, the "Field Key" data will (may?) be different, but the same principles will apply - %value[field key] (if no fieldset involved), and %value[fieldset field key][field key] (if data is in a fieldset), right?

Thank you very much for your patience and persistence!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Automated email to be sent upon joining a group?
October 23, 2011, 04:26:52 pm
Glad we're on the same page now.

Yes, upgrading to webform_civicrm 2 will change your field keys, so you may as well get it over with now to avoid future hassle with your tokens. I recommend 2.x-dev rather than 2.0 because it contains a few bug fixes (soon to be in 2.1).
Try asking your question on the new CiviCRM help site.

narragansett

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.41
  • PHP version: 5.3.2-1
Re: Automated email to be sent upon joining a group?
October 30, 2011, 10:26:58 am
colemanw - Thanks again for your help.  The confirmation email now works as I envisioned, it has been implemented, and people are using it without any problems - hooray!

petednz - Thanks as well to you, both for getting colemanw involved, as well as for reminding me about adding activities & tags upon submission of a webform.  I added both items, and they will aid greatly in ensuring the overall processes I have set up works smoothly.

I appreciate the help from both of you - thanks again!

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Automated email to be sent upon joining a group?

This forum was archived on 2017-11-26.