Merge tag to display just the file name of uploaded file

I’ve searched but haven’t found the answer to my exact question. I have a hidden field that I would like to hold just the file name of an uploaded file. Using just {:73} works to get the whole URL, but I need to prepend and append text to just the file name.

Is there a way to just get the file name by itself? I need to preserve the file name, but change the link structure.

Hi Andrea. You can use the gform_merge_tag_filter to add a modifier for a merge tag that could get the filename only. Take a look at this example:

That would not run before the form is submitted, so you would need to do more work to store that in a field in the entry. With this modifier, you could output the filename rather than the complete URL in the notification or confirmation.

If you have any other questions, please let us know.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.