5

How do you create a webform on a node insert?

I create an event content type and want to automatically add a webform with 3 fields (lastname, firstname, e-mail) on node insert of the event. I do not want the client to add the webform each time he creates an event node. I want a webform per node.

3

1 Answer 1

2

Under /admin/config/content/webform you can enable your event content type for webforms, and the form will be created as part of the node creation process.

Edit: Misunderstood!

Webforms are one-off forms. If I now understand correctly, you want to re-use a standard form on each event page (only one form created).

To do this, create a webform with the required fields, and while editing the form, go to the webform tab > Form Settings. Under Advanced Settings at the bottom select 'Available as Block'.

You can then use the Block settings to display the form on every Event page as required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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