When someone uses my form, they can upload upto 15 images.

I have about 10 - 20 uploads a day, which means that i could get upto 150-300 images per day.

The issue i've got is with where these images are stored. ALl in the /uploads/ folder without any reference to who uploaded them.

Is it possible to move these uploads into a unique folder, named after the entryID of the submitted form, maybe with another field name, so:

../uploads/gravity/[firstname]_[entryID]/[uploads here]

If this is possible, then I can use an FTP client to access each entry & all the relevent files with ease, without needing to log into wordpress and click through each entry.


I'm also using Zapier at the moment to take these files & put them in their own folder, but this is costing me month fee because there are so many entries. If I can do it all on my own site, this would be fantastic.

1 Answer 1


Here's some code that will get you at least half way there:


Changes you'll need to make:

  1. Also stash the current $entry object in the stash_current_field_id() method.
  2. Use the stashed $entry to modify the file upload path in the modify_file_upload() method.
  • David - where does that go need to go? Does it goes somewhere inside of the Gravity Forms code, or just into the functions file?
    – user66227
    Commented Jan 19, 2015 at 17:05
  • The theme's functions.php file is the easiest. You can also include it in your own custom plugin or via the Code Snippets plugin. Commented Jan 19, 2015 at 20:31
  • Note, when you do this, deleting entries will not delete the custom folders and files.
    – chris
    Commented Mar 3, 2016 at 3:07

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.