Active
Project:
Webform Rules
Version:
7.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
19 May 2014 at 08:11 UTC
Updated:
23 May 2016 at 06:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kevster111 commentedI think I have the same issue, with different use case. I can access a couple variables. My use is for creating a new node on a webform submission. Once submitted a node of a different content type gets created. Works for the most part but can't map submission components to new nodes fields with the exception when I use create new entity on submission I can access the title component. Basically the new node is create but just the title and author gets added. (somewhat useful but the fields would be nice). Tried all kinds of conditions to get the variables to be usable on action but seem to only be useable at the event level.
https://drupal.org/node/2020149 This is an issue I think relates and the patches might work to solve your issue. Not sure if its updated in latest dev though waiting on an answer.
Comment #2
bysv commentedHow can i get the variable with the sid value?
If I print $data array ( print_r($data); ) i get the "sid" number at first level.
For example if the next submission id will be '705', i do:
and the value is showed ok (250).
I try to get the 'sid' variable with php to use it.
How can i get the variable with the sid value?
Thanks and sorry form my English!
Comment #3
bysv commentedHi again,
In README.txt of Webform Rules module say:
To get the submission id, use
<?php print $data['sid']; ?>but the problem is that always is empty.
I dont know what can be the problem.
Need your help, Thanks!
Comment #4
irowboat commentedBe advised, WFM (Webform Multiple) might break the tokens! For instance [data:sid] was empty no matter what I did, until WFM was disabled.
Comment #5
shenzhuxi commentedIn hook_tokens, $data['webform'] is not array but object now.
Here is the patch to make it work with webform 7.x-4.12.
Tokens should be like:
[data:WebFormField]
[data:WebFormField-value]
[data:WebFormField-value-raw]
My test rule for example
Comment #6
tsmulugeta commentedThe patch in #5 didn't work
Comment #7
shenzhuxi commented@tsmulugeta Can you export your rule and post it?
Comment #8
pauldolphin commentedPatch #5 did not work for me either.
webform_rules: 7.x-1.6+4-dev
webform: 7.x-4.10+8-dev
rules: 7.x-2.9
Created a test rule exactly like the one found in #5 and still submission data is empty. I do not have webform multiple installed as recommended in #4. Even print $data['sid']; produces no data.
It appears this is similar to the issue found at the following url. The latest version of these patches did not help resolve my issue either. Can anyone help point me in the right direction?
https://www.drupal.org/node/2020149
Comment #9
matthewgann commentedPatch in #5 worked for me.