0

I have a content type let’s say "hotels" and there are a bunch of nodes for different hotels. I would like to display a content form either as a block or in the node itself, where users can send an e-mail to the accordant hotel owner.

How can I do this? I have tried using display suite and entity reference but could not get this to work.

Thanks for your help :)

1

For non coding solution, you can go with

Create the form using Webform and utilizing Webform Blocks and Token

Webform is the module for making forms and surveys in Drupal. After a submission customizable e-mails can be sent to administrators and/or submitters. Results can be exported into Excel or other spreadsheet applications. Webform also provides some basic statistical review and has an extensive API for expanding its features.


Form Block

Enables the presentation of user registration, site wide contact, or node creation forms in blocks. This is particularly useful for including forms on panels.

Worth mentioning, just might not do for this question's specific use case.


Do it programmatically by creating a custom block and fetching the form, you can find an example here Problems to integrate a form into a block

  • Thank you very much for your answer. I have tried to set this up but struggle in displaying a block with an accordat web formular as a block. How does this work in detail? – Castor Apr 21 '18 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.