Active
Project:
Contact Entityforms
Version:
7.x-1.0-alpha1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2012 at 14:01 UTC
Updated:
7 Oct 2013 at 23:14 UTC
Hi,
From reading the description on the module page, I couldn't figure out if this module can be helpful in building personal contact forms on nodes depending on email field that appears in each node.
More specifically, we have a vacancy database. Each vacancy is a node with fields, one of the fields being Employer's email address (Email type field).
Do you think this module can be used to build a "Contact employer" form below each node, and send the form results to an employer's address instead of sending them to site admin?
Huge thanks in advance.
Comments
Comment #1
tedbowThis would need some configuration and could probably just be done with Entityforms. You wouldn't need Contact Entityform.
It would probably just to have link with "contact employer" that would take them to the form
You could use
http://drupal.org/project/ccl
To create the links on the nodes and send the node id in the query string of the link.(use the local action submodule).
Then use an Entityreference: http://drupal.org/project/entityreference
To add the reference field to the node on the entityform form
http://drupal.org/project/prepopulate
To prefill the node link on the from the query string. and then disable the field so the user can't change it.
Then you would have to use a Custom Rule: http://drupal.org/project/rules
To email to the email field on node(which is now in the entityreference field of the entityform).
So it would take some configuration but no custom programming
Comment #2
1000Li commentedOh! Thank you very much for your detailed reply. I will try the configuration you suggested. Thank you once again!!
Comment #3
aanjaneyam commentedCould I please have some steps or guidance on how to create rule. I have completed the other steps like sending the node title (using nid in url) to the entity reference filed of entity form and preppulated it using entityreference_prepopulate (I used article in http://www.wunderkraut.com/blog/simple-contact-form-per-content-item-wit... as guidance).
Comment #4
tedbowRules is very complicated. More than can be gone over here:
See this tutorial. The Video links are on the right?
http://nodeone.se/en/learn-the-rules-framework
Comment #5
aanjaneyam commented@tedbow thanks for the reply. Well I know the rules module is complicated. But Here some more guidance it needed, for example how to get the email field from the referenced node to provide it to the "To" field of the Entityform Submission rule (by variable). I am also trying to use field extractor module to extract the email field in the referenced node. Some indications as to conditions and actions might give a starting point. I have alredy spent two days on it. So any help is very much appreciated.
Comment #6
aanjaneyam commentedAnyways I have accomplished it. I have created many rules before and some hint was needed. It was very easy straightforward rule. As said above the only thing I needed to know (or was missing from me) was the correct token to be used in "To" field.). The correct token is in chained form [entityform:entity-reference-fiield:field-email]. Rest was copied from "Email Entityform Submitter" component and user roles added to it.
Comment #7
tedbow@amsri glad you figured it out. It would great if you could create a handbook page for this.