How do I start/allow download of pdf when a form is submitted?
Permalink
Hello,
I have a simple form (firstname, surname, email). When the user completes and submits the form I would like a pdf download to start.
I understand that I can place the link to the pdf file as the form 'action' (i.e. action="file.pdf"). So when the submit button is clicked the file starts to download. My problem is, is that my 'action' is already used to send the data to a 3rd-part site where my data (name, email) are stored (action="https:somewebsite.com/brochuredownload.php").
I was thinking that maybe I could open a magnific popup with a download button when the form is submitted. I can do this with a simple 'download' button (without submittiing form fields to 3rd-party site), but in my case I have the problem of needing the form submit button to send data to my 3rd-party website but also opening a popup box with a download link...?
Any ideas very welcome.
Thanks
I have a simple form (firstname, surname, email). When the user completes and submits the form I would like a pdf download to start.
I understand that I can place the link to the pdf file as the form 'action' (i.e. action="file.pdf"). So when the submit button is clicked the file starts to download. My problem is, is that my 'action' is already used to send the data to a 3rd-part site where my data (name, email) are stored (action="https:somewebsite.com/brochuredownload.php").
I was thinking that maybe I could open a magnific popup with a download button when the form is submitted. I can do this with a simple 'download' button (without submittiing form fields to 3rd-party site), but in my case I have the problem of needing the form submit button to send data to my 3rd-party website but also opening a popup box with a download link...?
Any ideas very welcome.
Thanks