1

This question already has an answer here:

First of all, let me explain my project. I want users to place orders of products using webforms and then create a node with a link/reference to the submission and others custom fields.

It looks like this :

CONTENT TYPE PRODUCT : - Field name / Field image / Field category / Field description

Webform is enabled for PRODUCT content type. So I've created products examples and each of these products have their own CUSTOM webform (all the forms are differents)

For example :

PRODUCT A (product content type) - fields values + custom webform fields

So what I want this kind of node beeing created after webform submission :

CONTENT TYPE ORDER NODE : - webform sid reference (linking to the submission results) - Some fields which will be the same for every product

Do you think is possible with a custom module or should I find another way to achieve this ? (I suppose replacing webform by a content type, but the problem is webform, in my case, is very usefull)

I have to point out that I'm a beginner in Drupal module's developpment.

Thank you ;-)

marked as duplicate by Mołot, Clive Jan 8 '14 at 15:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

You should use Rules module in the following way:

  1. Install and enable Rules module
  2. Install and enable Webform Rules (https://drupal.org/project/webform_rules)
  3. Create a new rule
  4. Choose the "After a webform has been submitted" event
  5. Optionally set your conditions
  6. Add a new action "Create a new entity" of type "Content"
  7. Add the neededs action to add properties to the created entity
  8. Add the save action

I hope this helps.

  • Yay ! So easy. I'm discovering the power of rules. Tokens available with "Set a data value" action allowed me to do what I wanted ! Thank you very much. – Bugsou Jan 9 '14 at 11:58
  • Hi. Can you elaborate on step 7? I can't find a "neededs" action. I'm struggling with how to match the webform fields to the node fields. Thanks! – Sam Feb 24 '17 at 16:48

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