Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Right now, submission data is not exposed to rules except by way of token replacement or custom php actions.
This patch exposes submission data in a "first-class" way.
In this patch:
- includes #1948824: Unable to pass submission data into action set component to fix implementation of hook_rules_data_info(). (This patch will require a re-roll when that gets in.)
- extends hook_rules_data_info() to expose all properties of a submission
- provides better access to submission component values
- class WebformRulesSubmissionWrapper implements RulesIdentifiableDataWrapper to provide entity wrapped access to webform submissions
- New condition "Submission to a particular webform", which works almost identically to "Webform has name", except it relates the submission data to the webform id, instead of text-to-text. (I chose to implement this new condition as separate, rather than combine them, in order not to break any existing rules.) This relation allows for:
- Rules assertion to expose webform components only for the selected webform, instead of exposing all webform components for all selectors (which would not be scalable).
Areas for continued development:
* provides read-only data. setter callbacks not implemented.
Comments
Comment #1
AaronBaumanComment #2
AaronBaumanComment #3
AaronBaumanComment #4
AaronBaumanComment #5
AaronBaumangrumble. still doesn't quite work
Comment #6
AaronBaumanReady for Review:
Comment #7
penone CreditAttribution: penone commentedQuestion - does this patch allow me to choose a field value from my webform submission as a condition.
For example - if the user gives a value of Yes on a question can I now use rules to redirect the user to a different url?
Comment #8
AaronBaumanyes
Comment #9
HyperGlide CreditAttribution: HyperGlide commentedWhen adding the new condition "Submission to a particular webform",
I got an error "Unknown condition data_nid."
Comment #10
HyperGlide CreditAttribution: HyperGlide commentedNot trying to highjack the issue just see if my use case matches this patch.
Working with rules and have (2) rules component rules.
They are both (actions) to 1 larger rule that responds to an event - After a webform has been submitted -
- Component 1 - Test to see if the email address in the web form has an account on the site. If YES - Gives Warning to User.
- Component 2 - Test to see if the email address in the web form has an account on the site. If NO - Creates and account and informs the user.
I believe the submitted webform tokens are not being passed to the components for evaluation and action.
A copy of the rule and the components can be found here:
Rule - https://gist.github.com/HyperGlide/1add428b95885dd1a1ff
Condition 1 - https://gist.github.com/HyperGlide/5961d6c752f81848e790
Condition 2 - https://gist.github.com/HyperGlide/4885d7b32ad833e0b1f0
Comment #11
jams1988 CreditAttribution: jams1988 commentedHey Arron:
I applied the patch, and I am happy that I can get some data like data:name.
But when I tired to use the old token like[data:{component}-title], [data:{component}-value].
I get a error:
Fatal error: Cannot use object of type stdClass as array in /home1/varoon5/public_html/majoreno.com/sites/all/modules/webform_rules/webform_rules.module on line 213
Can we keep the old token available and the new data:xxx in your patch? Thank you~~~
Comment #12
AaronBaumanThanks for the reviews.
I think preserving the old tokens is definitely important.
I hope to have some time to work on this soon, but feel free to pick this up if anyone else wants to.
Comment #13
Juisi CreditAttribution: Juisi commentedHello Dear Community.
Thank you for this important patch!
This is supposed to be additional questioning to: #7 by penone
Sorry if this comment bulks your whole window, i prefer to define the context or the question as well as possible (..and this is my first actual post on drupal.org:)
The patch seems to bring a solution to exactly what i wish to accomplish:
Anonymous users submit their contact info to a ticket ordering system. The webform sends payment info mail to the submitted email address. Works as it should.
At some point the admin manually checks the payments (from a bank web site) and decides to update the order submissions.. 1 by 1.
Rules event: After a webform submission has been updated
(the update is made by admin user, who sets one particular (checkbox) webform field 'varauksen_tila' value from 0 to 1 ..which means that the particular ticket order has been paid. This event is supposed to trigger the action of sending of another email to the user.."thanks for your payment etc"..
the select field is configured with a default value of 0
and the options are defined as key|option pairs:
0|maksamaton
1|maksettu
Rules condition: a field 'varauksen_tila' value == 1 ....proceed to actions
So now the questions:
Question 1. Does the Rules recognize the the above field key as the data:{component}-value or is it the option that should be compared as the data:{component}-value
Question 2. Should i set the condition to 'data comparison' or does some other condition option provide this functionality?
Question 3. Should the data selector be set to data:varauksen_tila-value ..or how is the syntax supposed to work within the patched logic? I'm having a problem to get the rules to recognize or accept any of these added webform components. The data selectors list does not show the component data:varauksen_tila nor does it show any of the other fields which i added to the webform.
Just showing the default lines:
data The submitted webform data
data:sid Submission ID
data:submitted Date Submitted
data:remote-addr IP Address of the submitter
data:uid User ID of the submitter
data:name Username of the submitter
data:is-draft Whether the submission was finalized
form-id The form id of the submitted form
selected-webform Webforms The name of the webform to check for.
selected-webform:0 Webforms The name of the webform to check for.
selected-webform:1 Webforms The name of the webform to check for.
selected-webform:2 Webforms The name of the webform to check for.
selected-webform:3
Question 4.(supposed i get the above working) How can i compare the component value to a fixed value like 1? does the component value need to be numeric before the rules lets to make a direct input mode comparison between the component value and a fixed value ?
Btw. at some point i was seeing the Rules to suggest my custom webform components as data selectors. Unfortunately, i already had messed up the first part of the condition with the generic data selector 'data'. So i deleted the rule to start over but the problem persisted.
Are we looking a bug here or am i just misconfiguring the webform field and/or the Rules condition?
Thank you very much for your patience!
Best,
Jussi
Comment #14
wizonesolutionsaaronbauman: How's your time atm? Do you know more or less what needs to be done to support the old tokens? I'm not sure if I have time either, but a reader might if a general implementation plan is laid out.
I have used the patch, though, and just wanted to say THANK YOU. Once fully-baked, this patch will make Webform Rules way, way better and more usable.
Comment #15
erc23mohan CreditAttribution: erc23mohan commentedHi aaronbauman.. your webform_rules-expose_submission_data-2020149-6.patch looks promising. I am eagerly waiting for an update which allows me to compare webform submission fields data to trigger actions. On updating this patch I also got error as in #7. Please update the patch.....
Comment #16
sonicthoughts CreditAttribution: sonicthoughts commented+1 subscribing
Comment #16.0
sonicthoughts CreditAttribution: sonicthoughts commentedupdated to include new info from comment thread
Comment #17
mirsoft CreditAttribution: mirsoft commentedThe error in #9 appeared to me if I didn't empty cache after applying the patch.
Comment #18
HyperGlide CreditAttribution: HyperGlide commented@mirsoft thanks for the post.
Comment #19
kevster111 CreditAttribution: kevster111 commentedIs this patch in the current dev? Latest stable release seems to only show webform submission component variables on adding an event. Not allowing those variables use in action. Tried all kinds of conditions. Created node on webform submission works great but only allows title and author variables from webform submission. I would think this patch would solve that. I might be way off though.
Comment #20
logaritmisk CreditAttribution: logaritmisk commentedRe-roll agains dev and fix
Fatal error: Cannot use object of type stdClass as array
.Comment #21
Marc Angles CreditAttribution: Marc Angles commentedHi, I'm trying this patch (#20) on a prestine drupal install to test it.
As soon as I try to add the conditions "Submission to a particular webform" I have an error "Unknown condition data_nid"
Comment #22
bisonbleu CreditAttribution: bisonbleu commentedEdit: rewrite of my initial post based on new tests on a very basic Webform (webform-7.x-3.20, 7.x-4.0-rc3, 7.x-4.x-dev).
Having major issues with patch in #20: system errors + empty tokens.
Use-case: a simple Webform with 3 fields. Form keys are: first_name, last_name and email. A basic rule. Event: After a webform has been submitted. Conditions: Webform has name (Parameter: The form id of the submitted form: [form_id], Webforms: Webform simple test). Action 1: Show a message on the site. Action 2: Execute custom PHP code: dpm($data);. Here is what I get when I submit this form.
Errors
Show a message on site
- input:
data:sid = [data:sid], data:first_name-title = [data:first_name-title], data:first_name-value = [data:first_name-value]
- output:
data:sid = , data:first_name-title = , data:first_name-value =
Devel output
Comment #23
bisonbleu CreditAttribution: bisonbleu commentedUpdate.
Fatal error will occur when tokens listed under Replacement patterns for The submitted webform data are used inside an Execute custom PHP code action e.g. dpm("Data SID: [data:sid]");.
This appears to indicate that there might be a problem with the implementation hook_tokens() in webform_rules.module.
Comment #24
bisonbleu CreditAttribution: bisonbleu commentedI think the above warrants setting this issue back to 'Needs work'.
This patch looks great and I could sure use its functionalities. Any help in resolving this issue would be greatly appreciated.
Comment #25
bisonbleu CreditAttribution: bisonbleu commentedsmall typo
Comment #26
Laz5530 CreditAttribution: Laz5530 commentedWebform vers. 7.x-4.0
Webform Rules vers. 7.x-1.6
I eliminated the bug that caused: "Notice: Trying to get property of non-object in webform_rules_condition_data_nid() (Line 226 of /.../webform_rules/webform_rules.rules.inc)."
So now the condition "Submission to a particular webform" actualy works(until now it always returned FALSE).
I still got 20x "Notice: Array to string conversion in DatabaseStatementBase->execute()" but its ok.
Comment #27
webflo CreditAttribution: webflo commentedFixed the "Notice: Array to string conversion in DatabaseStatementBase->execute()" bug.
Comment #29
stBorchertThanks for your work guys. Committed to 7.x-1.x-dev.
Comment #30
melvinlouwerse CreditAttribution: melvinlouwerse commentedIs this issue indeed ready with the latest patch ?
see comment #23
When i use the latest patch i still experience that problem.
Comment #31
Laz5530 CreditAttribution: Laz5530 commentedHi,
I experienced the same problem like #30. The cause can be the new verison of Webforms and Ctools.
And also the tokens in E-Mail-Rules didn't worked to me (like #10).
Webform 7.x-4.2, Webform Rules 7.x-1.6, Chaos tools 7.x-1.5 and Drupal core 7.34
I upgraded the patch in #27, changes
Comment #32
Laz5530 CreditAttribution: Laz5530 commentedPatch upgraded:
Every token should work now. Like [data:e_mail-value], [data:e_mail-title]
I give every argument to the drupal-renderer, so it can do its work.
In version #31 select-field tokens always returned the key and not the value.
E.g SelectField "YesOrNo" (1|Yes; 2|No) with Yes selected
[data:yesorno] was replaced with "1".
Comment #33
stBorchertIf there is still a problem there is no need to include already committed code in the new patch :)
The patch in comment #2020149-27: Expose submission data to rules is included in 7.x-1.x-dev.
Comment #34
Laz5530 CreditAttribution: Laz5530 commentedThanks for the hint, here is the rigth patch - without already commited code :)
Comment #35
Exploratus CreditAttribution: Exploratus commentedI tester #27 and #34, doesn't seem to change anything. Can't see webform data.
Comment #36
Laz5530 CreditAttribution: Laz5530 commented@Exploratus where can't you see webform data?
Here is how it works for me (sorry for my bad english):
Comment #37
kevster111 CreditAttribution: kevster111 commentedSo what do I need installed to get this to work. Been a bunch of patches so I am a little behind. Latest dev and the patch in 34? Is that all?
Comment #38
Laz5530 CreditAttribution: Laz5530 commentedYeah, latest dev and patch #34. It should be the same as the release 7.x-1.6 and patch #32.
Where can you download latest dev? Under https://www.drupal.org/node/982408/release?api_version%5B%5D=103 I see no dev.
Comment #39
stBorchert@Laz5530: if you scroll to the bottom of the linked page you will find the 7.x-1.x-dev release (last but one item).
Here is the direct link to the relases: https://www.drupal.org/node/1114618
Comment #40
kevster111 CreditAttribution: kevster111 commentedNot sure if I should add this as a new issue but I think it relates to this thread or Im just not doing something right. Ive attached an image of my settings. This started happening after the update.
Im not sure that the components are getting evaluated right. I am creating a separate node on webform submission. The node does get created but only the author gets filled correctly as I set it to be admin (1) every time. The title which used to work before I updated to current dev and patch in 34 used to go in correctly but now it just gets output as array (literally) that is the title of the created node after a webform submission.
In the image you can see Ive added fields on webform submission but those have never worked for me anyways so that isn't from the update, I just don't know the correct procedure.
If there is a donation box Id add something for showing me the correct way to do the above. Also Im thinking there is a bug since it used to at least give me the title.
Comment #41
Laz5530 CreditAttribution: Laz5530 commented@stBorchert: Thanks, found it.
@kevster111: What input mode do you use in Create a new entity/title? If you use direct input mode than [data:first-name:0] is not a valid token. You should use [data:first_name]. Can you try that?
I understand you tried to use that, but the tokens in "data selection" mode are not the same as in "direct input" mode. If you switch to "direct input" mode and open "replacement patterns" you find [data:{component}-value]. You have to replace {component} with the machinereadable-name of the component e.g. [data:first_name] or [data:e_mail].
I attached screenshots from a rule that does what you want and works for me.
Comment #42
kevster111 CreditAttribution: kevster111 commented@Laz5530: I used both methods. Nothing comes up. I did however try direct input again with value-raw and that seems to work. Going to direct input has now given me the following error thought. But the fields populate. which is better. They do show the extra text though which looks like value:billy or whatever name gets put into the field. I suppose I could rewrite results and strip the value text out but Im thinking I have something wrong.
Tried to remove the raw format and go back to just value and it stopped filling the fields again.
Heres the error I get (haven't looked through this thread for this particular issue yet sorry)
Notice: Undefined index: required in webform_rules_tokens() (line 229 of mysites/sites/all/modules/webform_rules/webform_rules.module).
Should say Im using:
entity --api latest
webform rules --latest dev plus patch
rules --7.x2.3
webform --7.x 3.21 (php ver 5.2 something) cant upgrade currently on that particular server.
Comment #43
Laz5530 CreditAttribution: Laz5530 commented@kevster111: It probably doesn't work for you, because you use old version of modules.
The latest stable releases: Rules 7.x-2.7 , Webform 7.x-4.2. So you should update.
As you can see in #31, I posted this patch because of the new release of webforms, so i don't think it would work with older versions.
If you can't or don't want to update you modules, you can try Webform 1.6 with patch #27 (it should be the same as latest dev) and use tokens like [data:form_id:component_id] e.g [data:13:4]
Comment #44
Exploratus CreditAttribution: Exploratus commentedI am using latest rules, webform, and dev version of Webform_rules. I applied patch #34. I followed steps in #36, but I am still unable to pull [data:t1] tokens.
When I try to use data tokens from my custom webform fields IN ACTIONS, the data tokens are just not there. The data: -> is empty. My webform fields are just not options on the list. When I try to force it, it says its an invalid parameter.
When I try to use it in CONDITIONS, for data: -> i get submission ID, date, IP, username, etc. But I don't get any of my webform fields.
Any help would be appreciated.
Comment #45
Rosamunda CreditAttribution: Rosamunda commentedI've got it working, but it is a little confusing how to set it up:
I've followed #36, but I'm stuck where you have to actually compare the data.
I have a webform node id: 8350 and a field called: estado, which is a list:
I want to target people selecting option 3. So I've selected "data comparision".
I have all this data selectors:
I assume that the field itself is data:8350--3 and the third option is data:8350--3:3.
What should I use as data selector? I've tried data:8350--3 and data:8350--3:3.
And what should I use as data value?
I've read all replacement patterns, and found:
[data:{component}-value] Component value The value of the selected component, e.g. "email-value".
So, I've tried: [data:8350--3-value] and [data:8350--3:3-value]
I keep getting an error when I try to submit the form:
Fatal error: Cannot use object of type stdClass as array in /home/sitio/public_html/sites/all/modules/webform_rules/webform_rules.module on line 213
Thanks for your help!
Comment #46
bisonbleu CreditAttribution: bisonbleu commentedI have a similar issue as @Exploratus in #44.
[SOLVED]
BEFORE (problems)
[data:full-name], Data value: some_name
, I see the following error in the Rules evaluation log: Unable to apply data selector data:full-name: Unknown data property full_name.AFTER (solution)
[data:my_precious_field-value]
. So watch out for underscores and don't forget to add 'value'.print $data->full_name[0];
is the same as [data:full_name-value]This is one very useful module. Thanks to all!
Comment #47
Laz5530 CreditAttribution: Laz5530 commented@Rosamunda: In data-comparison use data:8350--3:0 = 2 or data:8350--3:0 = completado (i can't test it right now but one of them will work).
For showing the value of field use [data:estado-value].
@bisonbleu: I'm happy that you got it working. And yes you have to use the machine-name, sorry if i wasn't clear about it before. Machine readable name always uses underscores for extra characters.
I'm not working anymore on the project, but i help if i can.
Comment #48
bisonbleu CreditAttribution: bisonbleu commentedThat's much appreciated @Laz5530 !
Comment #50
stBorchertI've committed the patch from comment 34 (with some fixes). Please test and review.
Comment #51
4aficiona2 CreditAttribution: 4aficiona2 commentedWhich was the last patch which got applied to the latest dev release? #34?
I use Webforms 7.x-4.5 and Rules 7.x-2.9.
I have troubles with the latest dev release of webform_rules and it seems that neither of my token [data:festivalpass_email] nor [data:festivalpass_email-value] get evaluated when I want to create a new entity (user).
Before upgrading to the dev release I used the 7.x-1.6 release and evaluated them with PHP like this:
print $data['components']['festivalpass_email']['value'][0];
This worked for simple textfields but I could not figure out how this works with select lists and file fields.When I used the above PHP code (which worked for 7.x-1.6) I get the following error:
Fatal error: Cannot use object of type stdClass as array in .../docroot/sites/all/modules/contrib/rules/modules/php.eval.inc(125) : eval()'d code on line 1
Any hints?
Comment #52
4aficiona2 CreditAttribution: 4aficiona2 commentedI figured out why I got the Fatal error
Fatal error: Cannot use object of type stdClass as array in .../docroot/sites/all/modules/contrib/rules/modules/php.eval.inc(125) : eval()'d code on line 1
Data now seems to be an object with a data array which is again an array but does not anymore use the machine_name as key like with 7.x-1.6.
Don't really know when what to expect.
When I use
sometimes the components are available with their key and sometimes not as you might see in the uploaded images.
I also have a multilang setup like bisonbleu mentioned where the tokens do not work or are actually empty strings. But I don't use webform_localization so far ... but webform_hints and webform_phone.
Comment #53
4aficiona2 CreditAttribution: 4aficiona2 commentedComment #54
4aficiona2 CreditAttribution: 4aficiona2 commentedDowngraded to 7.x-1.6 release and try to go as far as possible with PHP code like below
Comment #55
lex0r CreditAttribution: lex0r commentedI couldn't make the latest dev (with patch from #33 committed) work for me - tokens were not available because of different argument format expected by webform_rules_tokens. See the patch, it may help if you have the same issue.
Comment #56
lex0r CreditAttribution: lex0r commentedA better patch (no notice when invoked natively from a rule, not rule component)
Comment #57
Sansui CreditAttribution: Sansui commentedHave tried latest dev, 1.6 + patches, dev + patches
No combination I've tried allows the "Submission to a particular webform" condition to see the submission data.
I get this kind of error message "Data selector data:email for parameter webform is invalid". The "data:" option shows up in the dropdown, but not in the data selectors fieldset
Comment #58
mywebmasteruk CreditAttribution: mywebmasteruk commentedI have the same issue as #57, any updates?
Comment #59
Dubs CreditAttribution: Dubs commentedFor me I had to change another line (apologies - making a patch from here is tricky).
Change line 496 of webform_rules.rules.inc from: -
$s = current($s)
to
$s = reset($s)
It looks like the pointer is out on the array - reset just uses the first (and only) item in the array regardless.
Comment #60
selfuntitled CreditAttribution: selfuntitled commentedI'm getting Fatal error: Cannot use object of type stdClass as array in ~/public_html/sites/all/modules/webform_rules/webform_rules.rules.inc on line 226 with the current dev snapshot, which I think includes all (or almost all) the patches above, along with current versions of Rules and Webform.
The problem is triggered when you try to have two rules that apply to the same webform.
When you do this - when webform_rules_condition_data_nid() is called, it's passed $submission as an object instead of an array, which causes the if( empty() to fail.
It looks like this may be a simple patch, will try to turn something around tonight.
Comment #61
selfuntitled CreditAttribution: selfuntitled commentedThe attached patched should resolve the error I was getting in #60.
Webform_Rules_Condition_Data_NID is called every time a rule is testing which webform form is being submitted.
Except, the second time it's been called, the outer array around $submission has been stripped off leaving only the contained object.
This patch just tests the type of $submission and interacting with it accordingly and then dropping nid into a variable so it's accessible in the rest of the function.
While I'm at it, looks like the last few lines of this function are useless, as we're never defining $selected_webform, so I removed those.
Comment #62
pauldolphin CreditAttribution: pauldolphin as a volunteer commentedI tried apply the patch in #61 on the latest dev version but I am still not having luck being able to use webform data in the rule I have created. I am attempting to use submission data to populate fields in a newly created node upon form submission.
EVENT: After a webform has been submitted
CONDITION: Submission to a particular webform (rules log show this passes as true as expected and fires the first action in my rul)
ACTION: Fetch webform submissions
node:nid (this appears to be working)
data:sid (continues to produce and error in the rules evaluation log "The variable or parameter sid is empty.")
This produces another error in the rules evaluation log: "Unable to evaluate action webform_submissions_load"
I've tried to simply print a message with the sid or values in using both token replacement and php but nothing is displayed. Everything continues to be empty.
[data:sid] [data:email-value]
print $data['sid'];
print $data['components']['email']['value'][0];
I came across this other similar issue. I did not have WFM (Webform Multiple) enabled but did have webform_multiple_file enabled so I disabled that in the event that this file module was messing things up. I tried the fixes recommended on this other issue on a clean version of the webform module and a dev version... this did not help either.
https://www.drupal.org/node/2270111
I've tried adding
dpm($data);
as an action using execute custom php code and as a message... but this produces nothing (yes I have devel enabled.)When I am in the rule... I have the ability to use the data selector to select these $data related fields. I see these $data related tokens in the replacement tokens dropdown. But... everything I try is just empty. I am unable to fetch the most recent form submission after it has been saved. I am unable to create a new node and use webform submission data to populate this new node's fields.
Anyone else still experiencing issues? Any help would be GREATLY appreciated. I have hit a brick wall and could REALLY use some help.
Comment #63
rooby CreditAttribution: rooby commentedWhat version of the module was the patch in #61 made for?
Not latest stable or dev.
Comment #64
Ubiquitous CreditAttribution: Ubiquitous commentedHello, everybody.
Please describe me how I should apply patches:
* everyone - one by one
or
* only the latest patch is enough?
By the way I can confirm that #61 could not be applied for 7.x-1.6
Comment #65
bisonbleu CreditAttribution: bisonbleu commented@Ubiquitous,
You can see in #50 that the patch from comment 34 was committed (with some fixes). 'Committed' means that this code is in the dev version; you should first try it and see if it works for you. The good news is: no patching is required.
But if you're still having problems with the current dev, carefully read the comments starting at #51 to find out what you should do and/or try for your use case.
About patching, Google drupal how to apply patch and you should find plenty of help, including videos.
Good luck!
Comment #66
smurfxx CreditAttribution: smurfxx commentedWhere can I find the dev version?
Comment #67
rooby CreditAttribution: rooby commentedAs far as I can tell this isn't fully fixed and the patch in #61 don't apply to latest stable or dev.
I cannot remember if I have tried the patch in #56 yet.
Comment #68
xenophyle CreditAttribution: xenophyle commentedThe code in the dev version isn't working for me at all when I try to use the condition "Data Comparison" on a field from a Webform. I get the same error described in comment #57.
When I follow along in a debugger it looks like the code in class WebformRulesSubmissionWrapper is expecting $data to be an actual submission, which doesn't exist while you are still setting up the rule. Ideally, you would have set a previous condition specifying which Webform the rule cares about, and then $data would include a list of fields for that Webform, not the submission.
If I had any idea at all how to fix that, I would.
Comment #69
sthomen CreditAttribution: sthomen commentedIn case anyone came to this issue as a rules novice like I did, there is a possible workaround to use the webform rules without having the values exposed (as this issue is for).
You can initialize a rules string variable with the tokens. If you need integers or booleans you can subsequently convert it to whatever and then use it to load nodes or whatever.
Hope this saves someone some hair-tearing.
Comment #70
bisonbleu CreditAttribution: bisonbleu commentedDoing this in Rules is proving difficult & complicated.
The easy fix for me was implementing
hook_webform_submission_presave()
in a custom module. Here is the suggested code copied from /sites/all/modules/webform/webform.api.php. Works like a charm.Comment #71
j9 CreditAttribution: j9 commentedDoes anyone know if this feature has been incorporated into the Webform Rules module?
Or is everyone still using the workaround? Thanks!