Is there a way to get the path of the file uploaded from a "File Upload" field?
I'd like to get the file after the form submission and populate another field in the form with the information. But I can't figure out the "hook" to grab the file field.
Is there a way to get the path of the file uploaded from a "File Upload" field?
I'd like to get the file after the form submission and populate another field in the form with the information. But I can't figure out the "hook" to grab the file field.
You could set the path using the following hook: http://www.gravityhelp.com/documentation/page/Gform_upload_path
Then you would always know where it is going to be uploaded.
Yes. I'm doing that actually.
BUT... if someone uploads a file of the same name it ends up renaming it with a sequential number after the form is submitted... but the form only knows to use the name of the file that's uploaded.
So, for example. someone uploads a file "myfile.pdf"
The file uploads to my directory and the PHP grabs the file that was uploaded. But... when someone uploaded the same file again WordPress (or whatever) doesn't overwrite it. So the NEW file becomes "myfile1.pdf" but the Gravity Forms still reads you uploaded "myfile.pdf" so the link goes to the "old" file.
Like this...
http://pastebin.com/ZAa8AcDG
I need a way to get the link of the actual file that was uploaded.
If you can get the lead id of the submission you could query for the lead detail that has the filename in it. that would give you a full path. this is all AFTER it's been stored of course.