Skip to main content

Modifier: :download

Force-download link. Write it after a colon: {Field:1:download}

About

Emits a download URL that sends the file as an attachment rather than opening it.

ProductGravity Forms
RequiresGravity Forms 2.5 or later
Works onFile upload, Post image fields
In the pickerOther settings

How to use it

Link straight to the file

The link downloads the file instead of opening it in the browser.

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

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutputWithout the modifier
{Attachment:18:download}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=1http://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

Where the merge tag picker offers it

Form fields: File upload · Post image.