I have a contact form where users have to fill in a name field and upload a file. I want to add the name the user filled in to the beginning of the filename, eg: firstname-lastname_filename.pdf. I am using Sprout Forms for Craft 3, both the most up to date versions.

Is this something I can do with original Sprout Forms functionality, or will I have to write a custom module or plugin to inject this code? Essentially, what I understand is I will have to find the code in Sprout Forms where the file is uploaded, and inject the code to add the special user submitted name data.

1 Answer 1


Sprout forms has hooks you can latch on to in your own custom module/plugin, so when a form is saved you can grab the asset and re-name at that point.

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.