I need to set up a form where users submit information in order to download a file that should be downloaded as soon as they click the submit button (which is going to say "Download").

Is this possible? I know I can always have the form redirect to a page with the download link, but ideally clicking download would start the download and submit the form at the same time.

3 Answers 3


You'll want to set the form redirect page to allow PHP and set http headers to force download of the PDF. Something like this.

You can, of course, mix EE tags in that PHP-enabled template, so you could include a value in your segment variables to look up the right PDF to download, etc. Lots of options.


Why not use jQuery to trigger a get request for the download URL?


I think, it would be fairy easy by using the hook either freeform_module_insert_end or freeform_module_insert_begin. And in this hook you can use the force download of "download" helper.

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.