Closed (fixed)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Provided Module Integrations
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2011 at 12:51 UTC
Updated:
26 May 2012 at 18:12 UTC
Hi,
Is it possible to set the form status of a webform within Rules?
I want to open/close a bunch of forms programmatically.
Comments
Comment #1
quicksketchYou should ask in the Webform Rules module queue. Webform doesn't provide any direct integration with Rules.
Comment #2
stborchertWhat do you mean with this sentence? Do you want to publish/unpublish the webform nodes?
Webform Rules gives you the ability to react on webform submission updates (create/update/delete), it does not provide any methods to enable or disable webforms.
Comment #3
Goofy2k commentedI want to close the possibility for the user to do further submissions. This can be done by hand via Webform > Form Settings > Status of this form.
This action removes the submission button, but the node itself remains published and accessible as it contains other info for the user.
I already have rules acting on the submissions. Now I want to have a Rules to change the form status.
I would be happy if at least I could do it with some php code in an "Execute custom PHP code" action.
Comment #4
stborchertUhm, ok. Seems, its a support request on Rules itself.
Try to load the webform node in the rule you're executing and print its values with
dpm()(module "Devel"). Then it should be possible to modify the node with something like this ("$node" is the loaded webform node):This should update the node and set the status if the form.
Comment #5
Goofy2k commentedThanks,
It should become something like:
I'll give it a try and report back.
Comment #6
Goofy2k commentedThis works fine !
Thanks. I can now go on to the next hurdle :-)
Comment #7
stborchertGreat to hear :)
Comment #9
mitchell commentedUpdated component.