I've been working all day to try and figure this out.

I have a view set up that takes every content type of "Gallery" and creates a nice view of all gallery types. I also have a webform where a user can upload an image. I then set up rules so that when an image is uploaded using that form an entity is created of type "Gallery"....and that's where I've been stuck.

I've been searching online for answers but can't find anything. Is there a way to take the image that was uploaded using the webform, and place it into the new gallery content in the field-images field?


That's my rules page currently. The php code that I was using was just dsm to check what was actually inside of each entity, along with me trying random code to try and figure out how to do this. None of it worked.

I'm not sure if this is the best way to do this or not, so feel free to let me know if you know a better way to do this (I'm a drupal beginner still).

Any help would be appreciated!

  • Try taking out the condition and putting in a simple action like displaying a system message. That's the way to make sure your event is firing.
    – Kartagis
    Commented Feb 23, 2016 at 19:44
  • @Kartagis it's definitely firing. That's not the problem. I just can't figure out how to actually set the image field on the new entity.
    – Chris
    Commented Feb 23, 2016 at 20:08
  • So, your rule is actually working; we just have to find a way to create the new entity with the image field in its place, right? Can you show me your content type structure?
    – Kartagis
    Commented Feb 23, 2016 at 20:11
  • You have a content type, right?
    – Kartagis
    Commented Feb 23, 2016 at 20:22
  • Yes. This is what the content type for the Gallery looks like: imgur.com/sGRPYQF And then the webform is just a form called "submit_photo" with the only field being a file upload form called "imageupload"
    – Chris
    Commented Feb 23, 2016 at 20:36

1 Answer 1


In your conditions, add entity has field: web form > image field.

That should allow you to set a data value on your created node with that image.

  • That's indeed how I'd also do it to get it, pretty sure, to work! Commented Feb 5, 2017 at 17:20

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.