2

I currently have a webform with the following fields:

  • Your Email
  • Your Name
  • Your Idea

Alongside this I have setup a rule that when a webform is submitted it creates a new node of a new content type I have created 'Idea'. A view then pulls in all these 'Ideas' to display.

The title of the node pulls in the Your Idea field using the value [data:your_idea-value] which works fine.

But I am trying to set the author of the node as the Your Name field but I am struggling, it doesn't allow a value to be used and can't figure it out.

I've managed to get it working where it sets it to Anonymous and then I setup another action on the rule to rename the author:name but it does it for all of the content, not just the new node.

I'm sure I'm just missing something simple, would be great if someone could assist.

enter image description here

Currently setup to set author as anonymous for the time being.

  • If you can't get it to work with what I wrote in my answer, then please include an export of your rule in your question (you rule may suffer other issues that would explain why it doesn't work). – Pierre.Vriens Feb 8 '17 at 15:09
2

Below is something I learned about using webform data in Rules, which may help you to get this to work (assuming your question is about D7) ...

You have access to all labels and all values of any field of a webform, ie:

  • [data:MachineFieldName-title] contains the Label of a field with machine name MachineFieldName.
  • [data:MachineFieldName-value] contains the Value of a field with machine name MachineFieldName

So try to use similar tokens.

For way more details on this, and a prototype rule about this, refer to the answer to "How to create a node from a Webform using rules?":

  • the 1st attempt relates to using "Entity has field" (which doesn't work for Webform)
  • the 2nd attempt explains what to do in case of Webform.
1

The problem is with the Author section is it can only be a Data selector or Direct Input, it can't use the Value field that the Title section can.

Otherwise I would just be using [data:your_name-value]

enter image description here

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.