Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I have an easy problem but I can't find an issue!
My problem: I have a website with a list of events.
I have created a content type "event" with many fields (date, title,...).
On the base of each event, I would like to have an form; the user will fill this form and the responsable of this event will receive an email. In this email, the title of the event has to be specified.
So I would like to know how to connect a form with a node?
And how pass a value from a node to form result?
Thank you and sorry for my english!
Comments
Comment #1
quicksketchYou'd need to use Webform 4.x to accomplish this without custom coding. I'd suggest upgrading, then Webform-enabling the "Event" content type. You can then make a hidden field with a default value of [node:author:mail], which will populate the hidden field with the node's author. Then use this hidden field as the source of an e-mail configuration.
This could also work with a single webform across the entire site (while being displayed as a block) if #919760: Add a [current-page:object:?] dynamic token were implemented into the Token module.
Comment #2
quicksketchThere's pretty extensive information on this over in this issue: #1617086: Webform > E-mails: Add "Content values" (ie: node field) support .