I can't figure out how to make the IF condition right => specify that only webform-client-form-155 on node 55, may fire this rule. At this moment my rule fires on the submit of every webform on my site. Hope someone can help me out?
{ "rules_aanmelding_informatieve_bijeenkomst" : {
"LABEL" : "aanmelding_informatieve_bijeenkomst",
"PLUGIN" : "reaction rule",
"WEIGHT" : "1",
"TAGS" : [ "aanmelding", "informatieve bijeenkomst" ],
"REQUIRES" : [ "webform_rules", "php", "rules" ],
"ON" : [ "webform_rules_submit" ],
"IF" : [
{ "webform_has_id" : {
"form_id" : "webform-client-form-155",
"selected_webform" : { "value" : { "webform-client-form-155" : "webform-client-form-155" } }
}
}
],
"DO" : [
{ "php_eval" : { "code" : "php_code to execute" } }
]
}
}
Comments
Comment #1
everkuil commentedUpdate: Must be webform-client-form-155 on node 155 and not node 55, sorry.
Comment #2
mjpa commentedSet the form_id to "webform-client-form-[node:nid]". The code appears to check that the evaluated value you give for form_id is in the webforms selected from the list.
Comment #3
stborchertSwitch to "data selection" and enter "form_id" (if its not there automatically). This will cause Rules to use the form id of the submitted webform for comparison with the id of the selected form.
Comment #4
everkuil commented"Switch to data selection and enter form_id" etc. works like a charm.
A picture is worth a thousand words.
Thanks for your answer and your work for this nice module.
Erik
Comment #6
technikh commented#3 works great. Thanks stBorchert