Rules send email on entityform submission with current node field content I have a rule which sends an email on saving an entityform. The entityform appears on several nodes.

I would like to 'grab' field content specific to these nodes and include this data in the email message body.

I think I might need a rule component but I'm unsure how to build a relationship between the node content and the entityform.

Can anyone help?
Add an entity reference field to the entityform in question and - using Entityreference Current module - check the option to reference current. This gives you access to current page data.

It's at this point you may want to install the Hidden Fields Widget module which will allow you to set the entity reference widget to hidden. Do this if you don't want the field to be visible on your entityform.

At the time of writing this, you also need to patch the Hidden Fields Widget module with https://www.drupal.org/node/1821008 to support the entity reference field type.

Next, create your rule with Event: After saving a new entityform submission, Conditions: Entity has field (select the entity reference field) and Actions: Send mail.

Now all you need to do is add another condition relating to the field token you want to use in your email body. Use the previous entity reference field condition as your data selector, then select the relevant field. This will now be available as a token in the Send mail action.

You can do this as many times as you want to get each field out.

I'm sure there's a more efficient way of doing this, but this worked for me.