The Brand New Blog Post Editor Released!

Read more
Mon. - Fri. 9 am - 5 pm Support Policy
Remember me

Trigger a File to Download on Form Submition

2 weeks 19 hours ago #1

  • Ian's Avatar
  • Ian
  • Posts: 12
Hi Again,

I previously tested using a Form to collect details and then when the Submit button was clicked the appropriate file would automatically be triggered to download and I had it working a couple of months ago.

Now that I am finalising my site I need to have all of my downloadable content available to a client when they click on the submit button of the forms, and I thought that the way I had it working previously was by putting the File Path to the download file into the Redirection Field in the Forms General Settings Page, however this doesn't work and just returns a 404 error after the form is submitted.

Perhaps I am not remembering correctly, so am needing to know how I can go about achieving this. The process that I need to achieve is this:

I have created a separate Form for each downloadable file, and what I need to happen is:

1) Client clicks on button which opens an Overlay containing the Form
2) Client fills in name, email etc and clicks to accept Terms & Conditions and Re-Captcha
3) Client clicks "Submit" button
4) Form data is saved
5) Download is triggered automatically

I have everything working except the download triggering.

Could you please tell me where I am going wrong and how I can achieve this outcome, :S

Many Thanks
Ian D

1 week 5 days ago #2

  • Artem's Avatar
  • Artem
  • Posts: 7413
Hi, Ian!

The URL to file is correct? You need to enter the full URL with http

Regards,
Artem, Balbooa.com

1 week 5 days ago #3

  • Ian's Avatar
  • Ian
  • Posts: 12
Hi Artem,

Thanks for the pointer. It was a sneeky problem, but I've just got it all working again.

I think what was happening is that I was copying the file name from the File Name in the Download Folder in Joomla and pasting it with the file path into the Redirect (because the file names are complex & I thought this would reduce errors), however, for some reason when doing it this way Joomla puts a "space" at the end of the name so it was making the file type suffix wrong (i.e. .7z plus a space ). So I copied the file names into my editor first and made sure that I didn't get any stray spaces and it is working perfectly again.

Thanks for all of your help, and I hope you are all safe there with all that is going on lately. ;)
All the Best
Ian D

1 week 5 days ago #4

  • Artem's Avatar
  • Artem
  • Posts: 7413
Great, that you found a solution :)
Let us know if you'll need more assistance!

Regards,
Artem, Balbooa.com
Powered by Kunena Forum