Entityform uses the Rules module for its notification system. When editing an Entityform Type, you can select rules to be run upon saving an Entityform Submission under Structure > Entityform Types > [form] and clicking the Rules tab. Rules and Rules Components that are tagged with "entityform submission" will be shown in this list.
Installation
- Install and enable Rules and Rules UI. Note: if Rules UI is disabled, then the Entityform Rules will not show up.
- Install and enable Entityform.
- Entityform Notifications requires the Entity Rules and Entity To Text modules.
- Create an Entityform Type.
- Navigate to Structure > Entityform Types > [form] > Rules.
- Configure the notification settings as desired.
Note: there are also settings at Configuration » Content authoring » Entityform settings
. (I assume these are for defaults that will be used when creating a new Entityform Type, but this needs confirmation from the module maintainer.)
Notification Settings > Notification Emails - send to multiple recipients
- In order to send notification emails to more than one recipient the addresses must be separated by a comma and a space:
notify1@example.com, notify2@example.com
. If there is not space after the comma you will receive an error that the addresses are invalid.
Entityform Rules
There two default Rules that come with the module:
- Email Entityform Submitter: Sends an email to the submitter.
- Email Entityform Admin: Sends an email to the email addresses specified in the Notification Emails property of the Entityform Type.
To view the settings for these Rules Components, navigate to Configuration » Workflow » Rules » Components
. You can clone these Rules Components or make your own.
Rules Components must have two parameters:
- An Entityform: this is the submission.
- An Entityform Type: this is the type of form the submission is.
How to send the email to an email address on the Entityform
For forms where the email address is filled in as part of the Entityform, it is useful to be able to send the email to that address. You can use Rules to do this as follows:
- Go to Configuration > Workflow > Rules then click the tab: Components.
- Click "clone" link for the Email Entityform Submitter component.
- Fill in the "Name" with something unique to your site.
- Leave the "entityform submission" tag and all "Variables".
- Click "Save changes" button.
- Click "edit" for the "Send email" action.
- For the "TO" data selector, click on "Switch to the direct input mode" button to get all available tokens.
- Click the "REPLACEMENT PATTERNS" fieldset link.
- Find your token. For example, if your email field is called email_address then the token should be
[entity:field-email-address]
. - Copy the token and paste it into the "TO" "Value" text area.
- Update the other rule fields as needed: Subject, Message, From, Language.
- Click "Save" button.
- Click "delete" for the "NOT User has role(s)" item in the "Conditions" section. This is for only sending email to logged-in users.
- Click "Save changes" button.
- Navigate back to your Entitytype edit form.
- Unselect the "Email Entity Submitter" rule and select your new custom rule. Make sure to also keep the "Email Entityform Admin" rule selected if desired.
- Click "Save entityform type" button.
- Now test your Entityform to see if the notification email is sent to the email address entered into the appropriate email form field.
How to update the Entityform admin notification email
It is useful to have the URL to the new Entityform submission within the email message that is sent to the "Notification emails" email addresses for the Entityform. You can use Rules to do this as follows:
- Go to Configuration > Workflow > Rules.
- Click "clone" link for the Email Entityform Admin component.
- Fill in the "Name" with something unique to your site.
- Leave the "entityform submission" tag and all "Variables".
- Click "Save changes" button.
- Click "edit" for the "Send email" action.
- For the "Message" "Value" text area, add any desired information and tokens. For example, for the URL for the submission, you could add
URL: [entityform:url]
. - Click the "REPLACEMENT PATTERNS" fieldset link to see all available tokens.
- Update the other rule fields as needed: To, Subject, From, Language.
- Click "Save" button.
- Navigate back to your Entitytype edit form.
- Unselect the "Email Entity Admin" rule and select your new custom rule. Make sure to also keep other rules selected if desired.
- Click "Save entityform type" button.
- Now test your Entityform to see if the admin notification email contains the desired information.
Learn more about Rules and Rules Components.
Comments
How about then if email
How about then if email address is in node field. How to congfigure rules then? Have tryed in different ways but have not succeed to get it work.
here is a step by step solution
https://drupal.org/node/2217023
Entityform in Node
I use entityform in views nodes, but don't use it with entityreference. How can I get the nodes url's?
Documentation for Entityform Notifications and Emails v 7.x-2.x
Is there any documentation for the v2 branch of Entity specifically the Notifications part
Not yet.
Not yet.
It seems that both my default
It seems that both my default submission rules are missing. How can I re-create them? I'm not sure of the conditions or actions that were included but any help would be great!
Please provide more
Please provide more information such as version of Entityforms and if it is this fresh install of Drupal.
Entityforms is version
Entityforms is version 7.x-1.1 and it is not a fresh install of drupal. Other modules have been installed as well as some custom ones.
Do you the "Entityforms
Do you the "Entityforms Notifications" module on?
I have the same issue. There
I have the same issue. There are no active Entity entityform_submission rules.
Entityforms and Entityforms Notifications are 7.x-2.0-beta1, Entityforms Notifications is on.
I understand that they are needed for e-mail notifications, so how can i create them?
Thanks for your help.
---
Update 1: I create the neccesary rule, it works now, but the bug is still exist.
Update 2: I found these rules, but they are not in the "ENTITYFORM SUBMISSION RULES" tab, but in the "Create Rules" tab.
I don't get how to use them, so i create my own rule in submission tab.
May be this would help somebody.
Please update this doc
The section "How to send the email to an email address on the Entityform" seems to refer to rule component parameter names that have changed in the latest 2.x version. I tried to follow this but did not get it to work. Please update/revise.
lunk_rat is Acquia Certified Grand Master
Needs Entityform 2.x version
@lunk_rat yes this document needs to be updated for 2.x . Maybe there should be two pages one for 1.x and one for 2.x now.
I don't have time to do this right but it would be great if someone could.
What about files
The form submission is working for me, but the problem are the files. The url or any other format doesn't appear in the email. Do you know If I need to do an extra implementation in rules to open the file and then put the url in the email?
Drupal experts in Argentina! www.tilon.com.ar
so much sadness inside...
Change module bro
Tokens in Rules
Entity to Text tries to convert the output of the Entityform Submission View Mode into plain text.
This will not work with all field types. Please check the Entity To Text issue queue and file an issue there.
The other option is to just edit the notification Rule and use the field tokens in the email body, instead of the Entity To Text token.
Email file attachments?
Anyone got anything to add on this? I'm trying various combinations of mimemail, entityforms and rules to try and get a file attachment in the email.
This is just the kind of thing that you would expect to be straightforward... But proving not to be simple at all!
I guess you would expect having file attachments in emails to be a common request and easily fulfilled.
Any ideas how to approach this?
How to Add File Attachments to Email Using Entity Forms
Here is a some more detailed guidance on how to solve this:
You will need to download and set up Mime Mail.
The latest version of Entity Form - currently 7.x-2.0-rc1 - comes with it's own preconfigured rules. You'll need the Entity Rules module for these. You can clone or edit these.
Alternatively you can set up your own fresh rules in the 'normal' way by using the 'After saving a new entityform submission' event.
Whichever method you go for you will need to add the 'Send HTML e-mail' element to the Actions stage of the rule (you can remove the existing actions if you cloned the packaged entity rules).
Edit the action and within the attachments section you can add a file path token, e.g.
[entity:THE_FILE_FIELD_NAME:file:path]
Check the Replacement Patterns for the field name and make sure you use 'file:path' as above and you will get an attachment on the HTML email.
Other file tokens include:
You may wish to use these in the email body for example.
Here is a list of file tokens. There are other useful tokens listed on there too.
Not working for me
I added
[entity:field_image:file:path]
to the attachments value.
Is there more to do? I don't even get the path printed. Its as if the value is empty.
I think with images you just
I think with images you just need to do [entity:field_image]
in any event, make sure you have entity rules downloaded and enabled, this worked for me!
Works perfectly!
This should be better documented, but your method works flawlessly!
Translating Notification Emails
Hello,
Loving the EntityForm module so far. Thanks for all your hard work on this.
I'm setting up an email rule in the Rules tab of my form and I need to translate the body and subject line. Is this possible? If I search for any of the strings in the translate interface nothing comes up. Do I have to create a language condition in the rule maybe?
Thanks in advance for any help or direction you can provide.
Cheers
Adding the field using the data selector.
I tried entering the field's token in direct input mode, but couldn't get it to work, but then I saw the description for the data selector.
This condition seemed reasonable anyway, so I added the condition (Entity: has field => Field: [the field I wanted]) to the rule and voilá, I could select the field in the rule action using the data selector (entity:field-name)
Entityforms 7.x-2.0-rc1
Entity Rules 7.x-1.0-alpha4
Entity tokens 7.x-1.6
Confirm that this works
This was a brilliant piece of advice, @Karol Haltenberger worked perfectly, thank you for posting this.
Not able to attach File field with unlimited value
Hi,
I am not able to attach file field with unlimited value like need to attach multiple files in single field.
Any suggestion ?
Best Regards,
Sanjay
skype:er.sanjaysoni
I have a form where I capture
I have a form where I capture the users' email address along with a bunch of other data but when I get the notification emails it does not have the user's address in the body. I have to go into the reports and edit the entry to get it. In it's place in the email it says "Contact person by email." Where can I change this?
OK, my problem was that I had
OK, my problem was that I had selected "Email contact form" in the emaill address menu in the display setting when I should have selected "Email plain text."