Skip to main content

Modifier :download

Download link. Example: {Resume:134:download} gives http://fixture.gravitykit.test/index.php?gf-download=grace-hopper-resume.pdf&form-id=503&field-id=134&entry-id=9101&hash=72343af43559278a0c4d723ad4b847b32baf8fa23455e61b13bff9a0467a727c&dl=1. On the test form, this field is {Resume:134} (File upload).

About

A link that downloads the file instead of opening it.

ProductGravity Forms
RequiresGravity Forms 2.5 or later
In the pickerOther settings, for File upload and Post image fields

How to use it

Link straight to the file

Write

<a href="{Attachment:18:download}">Download the invoice</a>

Get

<a href="http://fixture.gravitykit.test/index.php?gf-download=fixture-invoice.pdf&amp;form-id=501&amp;field-id=18&amp;entry-id=5001&amp;hash=de3e75a5bbb8665af11eda764de0e761e3f262eed827616a2f0b4d3fa9038abb&amp;dl=1">Download the invoice</a>

Examples

Output from the real plugin code, run on a test entry.

Merge tagOutputWithout the modifier
{Attachment:18:download}http://fixture.gravitykit.test/index.php?gf-download=fixture-invoice.pdf&form-id=501&field-id=18&entry-id=5001&hash=de3e75a5bbb8665af11eda764de0e761e3f262eed827616a2f0b4d3fa9038abb&dl=1http://fixture.gravitykit.test/index.php?gf-download=fixture-invoice.pdf&form-id=501&field-id=18&entry-id=5001&hash=de3e75a5bbb8665af11eda764de0e761e3f262eed827616a2f0b4d3fa9038abb

Works on

Form fields: File upload · Post image.