1

I'm looking for a way on how I could download an uploaded file from the node once the user has click submit on the webform.

enter image description here

Here is a sample of the webform

enter image description here

Confirmation settings doesn't offer a setting that can download a file after trigger. I can attach link to download the file but I would like the file to trigger automatically once user submits the form

enter image description here

2 Answers 2

1

I see two ways of achieving your goal.

  1. On after submit page, add a link to your file by adding the download attribute.

    <a href="https://i.stack.imgur.com/SUohe.png" download>Download the file</a>

    Then, add some JS to force the download.

  2. You can create a webform submit Handler where you can implement advanced stuff.

1

May you could inject a little JavaScript into the Webform and redirect the user to the file download.

Or set the webform's confirmation redirect to point to the uploaded file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.