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 Drupal Modules »
  • Drupal Webform Integration »
  • Webform Integration Tokens
Pages: [1] 2

Author Topic: Webform Integration Tokens  (Read 4285 times)

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Webform Integration Tokens
April 07, 2014, 01:02:47 pm
Hi Everyone-

Just updated to the newest Civicrm/Webform 4.0/Webform-Civicrm Integration.

I didn't read all of the readme files and have been dealing with a mess in terms of conditionals (my fault!).

Now that I have the conditionals sorted out, I am struggling with tokens.

Before updating, I used tokens in the following format %value[civicrm_2_contact_1_fieldset_fieldset][civicrm_2_contact_1_contact_first_name]  to pull data from prior pages in the webform into later pages (parents fill out multiple forms for siblings and I try to pre-fill info that should be the same across many families).

Several hours in, I cannot get these same tokens to work in the new format.

Right now, to pull in the first name of a previous entered student (each student has his or her own field set) I'm trying the token:
[submission:values:civicrm_2_contact_1_fieldset_fieldset:civicrm_2_contact_1_contact_first_name]

I've double and triple checked the keys for the fieldset and fields, but these fields just end up blank in later pages.

I don't know if these data are actually submitted... users hit next page, but don't necessarily hit submit.  Is that the problem?  Or, am I doing the tokens wrong?

It's probably something ridiculously simple, but I can't seem to figure it out.
Would appreciate any help!
Best,
-tiffani

 

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Webform Integration Tokens
April 07, 2014, 01:12:20 pm
https://drupal.org/node/1609324#tokens
Try asking your question on the new CiviCRM help site.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Webform Integration Tokens
April 07, 2014, 01:20:54 pm
Coleman,

Thanks for the response!
I was excited to find that page earlier in my question -- but following that format in my tokens, nothing shows up (the token text doesn't show up either -- so it's processing... just not pulling data -- which is a step in the right direction but not quite there).

I know that this is your baby, so a couple of questions:

1) I should be able to use tokens to pull data from prior pages of a webform (even if the entire webform is not submitted yet)? Yes?
2) The structure for data in fieldsets is: [submission:values:fieldset key:field key]  with no extra brackets or punctuation around the fieldset or field keys?
3) I disable the Webform Conditionals module.  Anything else that could be interfering that I'm missing?

Thanks again -- I love this module and how amazingly you support it. :)
-tiffani

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Webform Integration Tokens
April 07, 2014, 01:22:10 pm
Maybe it's the $ sign.

I experimented with that at one point... but perhaps when I still had the fieldset wrong.  Trying again.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Webform Integration Tokens
April 07, 2014, 02:04:45 pm
$ sign before key or before fieldset key (or both) does not seem to make any difference. 

Now I may just be going crazy.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Webform Integration Tokens
April 08, 2014, 09:22:31 am
With a stock webform I used the token [submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_contact_first_name]
and it worked fine, even when the form had multiple pages.
So as you suggest, insanity may be to blame.
Try asking your question on the new CiviCRM help site.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Webform Integration Tokens
April 08, 2014, 02:49:12 pm
Well... it will make me insane, if I'm not there already.

Update:
I think it has something to do with the update to Webform 4.

I have a multi-site install with 3 sites.  On 2/3 sites, the conditionals and tokens updated automatically.  Webforms and Civicrm integration continue to work perfectly.


On the last site, neither conditionals nor tokens updated.  I fixed the conditionals manually... and can fix the tokens manually, but there's something I can't see that's not working -- and my suspicion is that is what is causing the problem.  The tokens (when I write them correctly) are processing.  The text disappears, but it's not calling the proper info.

I'm also having a Mollom problem that arose during the same upgrade.  I don't _think_ the problems are related, but Mollom is one of the big differences between the sites that worked (no Mollom) and the site that did not (Mollom).

Will keep working on it and will update if I cure things.

Open to thoughts if anyone has any. :)

Thanks, Coleman, for checking.  It's nice to at least know that what I'm doing _should_ work.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Webform Integration Tokens
April 11, 2014, 01:03:44 pm
In case anyone else comes upon this:

I still have not figured this out.  quicksketch over at the Webform modules has been trying to help me out.

After reverting back to a backup and updating again, it looks like not all of the Webform updates are running on this site:  https://drupal.org/node/2236381

The obvious outcome is that tokens and conditionals don't update.  The more hidden problem is that even if you update conditionals and tokens manual, there are enough broken parts that tokens don't work.  I suspect that there are other things that don't work either.

I was convinced it was a Mollom problem but now that that is fixed and the problem continues,  I think it's a Rules problem: https://drupal.org/node/2120421

I do have Drupal Commerce and I did use Kickstart to get it set up (from UberCart) and despite several tries, I have not managed to get it sorted out.

My advice, for the moment, is, if you're using Rules and Commerce and used Kickstart... perhaps hold off on upgrading to the newest Webform/Civicrm Integration/Civicrm (I think I upgraded all because I upgraded CiviCRM and then it was not compatible with Webform-Civicrm Integration... so I upgrade everything.

Worked fine on 2/3 sites but this Rules thing is killing me.

I'm totally open to advice, but also putting this out there in case anyone is trying to decide if there's a downside to upgrading.


Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Webform Integration Tokens
April 23, 2014, 11:58:20 am
And, thanks to a lot of help from quicksketch over at Drupal/Webform, my webforms and civi integration are now functioning.  Tokens have updated but are still not working fully.  Going to follow the last suggestion on the link below to see if that resolves.

If others have similar issues, this pretty well documents my process: https://drupal.org/node/2236381


Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Webform Integration Tokens
April 23, 2014, 12:01:16 pm
Glad you got it resolved.
Try asking your question on the new CiviCRM help site.

bdika

  • I’m new here
  • *
  • Posts: 23
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Webform Integration Tokens
September 17, 2014, 02:58:55 pm
I am having the same problem as the original poster. I don't know if my Civicrm tokens have been updated. I am using Drupal 7 with Civicrm 4.4.4, Webform 7.x-4 and Webform Civicrm Integration 7.x-4.8. The question I have is this:

Should the "submission" tokens show up in the "Available Tokens" dialog when I click the link for "Browse Available Tokens" in the webform edit component screen? They do not show up in the main dialog (see attached file). I have searched for them by drilling down all the available topics without success. When I just put

Code: [Select]
[submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_contact_last_name]
into the "default value" field, I get a blank field when using the form.

I have a form that collects information on families. Parents and children. I collect the first and last name of each contact. I would like to automatically fill in the last name for the spouse and children of the person filling out the form after the person filling out the form has entered their last name.

Any help would be much appreciated.

Bill Dika

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Webform Integration Tokens
September 22, 2014, 06:11:30 pm
That's not how a webform default value works. It won't update fields on-the-fly as the user types.
Try asking your question on the new CiviCRM help site.

bdika

  • I’m new here
  • *
  • Posts: 23
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Webform Integration Tokens
September 23, 2014, 12:46:29 pm
Thanks for the reply Coleman.

Is there a way to do what I want? That is: automatically fill in a last name field on page two of the webform (before it is submitted) with the last name of the person who filled out his/her last name on page one of the form?

I am collecting family information on 2 pages of one form. On the first page is/are the parents. On the second page are the children. Since I want these to be CiviCRM contacts, I want the first and last name of each child to be entered. As a default for each child's last name I want to automatically fill in the last name of one of the parents.

This seems like a common case scenario to me, but my search has brought me to Webform Integration Tokens and I don't know how to make them work in the scenario I described. If they can't work, is there another way that I am missing?

Any help would be much appreciated.

Thanks.

Bill Dika

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Webform Integration Tokens
September 23, 2014, 01:56:49 pm
It's a general webform issue with little to do with CiviCRM.
Try this thread: https://www.drupal.org/node/1672890
Try asking your question on the new CiviCRM help site.

bdika

  • I’m new here
  • *
  • Posts: 23
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Webform Integration Tokens
September 24, 2014, 08:06:09 am
Thanks, Coleman.

I'll see what I can make of it.

Bill Dika

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Drupal Webform Integration »
  • Webform Integration Tokens

This forum was archived on 2017-11-26.