Entering Webform Has Name as a conditional and matching it to the correct webform does not work properly. Rules accepts the entry, but it evaluates to TRUE on ANY webform. So the conditional does not work as expected.

Comments

tonyhrx created an issue. See original summary.

alrueden’s picture

We had this problem too. Our symptom was numerous empty nodes being created at random times.

On the screen Editing condition "Webform has name", it's not clear what you're supposed to put in the box labeled "The form id of the submitted form." I tried entering the form ID of the form I wanted, matching it with the name of the form below, but that's not correct. You want to enter form-id. You can do this either by typing it in or by clicking the button that says "Switch to data selection" and choosing it from the list (see attached screenshot). It's not an ideal setup for obvious reasons, but I tested and it does work. More on this at https://www.drupal.org/node/1702600.

A little more about how I traced this issue: there weren't any errors in the Drupal watchdog. We wanted to create a node when the Event form was submitted, but we also have a number of other forms for other things. So, when someone would submit a different form, the rule would try to create an Event node and wind up empty because the other forms have different fields.

Marty_S’s picture

Assigned: Unassigned » Marty_S
Marty_S’s picture

Assigned: Marty_S » Unassigned

I cant reproduce this issue, i created сondition "Webform has name" and selected one of several webforms, so the action was only on the one webform - node was created after submit.
Also tested on other actions

Katy Jockelson’s picture

Thank you @alrueden - your reply helped me out. I too was trying to put the form ID in the Data Selector Field. I think that it didn't help that I was on 'Direct input mode', Switched to 'Data selection mode' and the field was pre-populated with 'form_id', leaving me to just select the webform by name from the 'Webforms' field.

I would love to see this included in the readme, i.e. instead of:

Condition:
Webform Rules adds a new condition to the rules configuration. With this condition you can tell rules to react only on one specific webform by selecting its title.

To have:

Condition:
Webform Rules adds a new condition to the rules configuration. With this condition you can tell rules to react only on one specific webform by selecting its title. The data selector field value must be 'form_id'