By: Chris Coyier Back to Guides
There are plenty of reasons why you might want to send to a file to a user after they have submitted a form. Here are a few examples:
- Give away a free eBook after signing up for a newsletter.
- Make MP3 files available for a freebie bonus download after requesting booking information from a band
- Have a PDF of a lease agreement available to download/print/sign after a flat rental form
Download Link in Confirmation Message
To do this on your Wufoo form, you can provide a link to download the file by using HTML within the form’s confirmation message. You do this from the Form Settings tab whilst editing the form in the Form Builder. The actual HTML of the link is like:
<a href="http://yourwebsite.com/file.doc"> Download File </a>
Download Link in Confirmation Email
Putting the download link in the message, as shown above, is nice because it’s available to the user immediately. It can be fleeting though. If the user closes the window before clicking that link, it’s gone. Instead you could put the download link in the confirmation email (or, of course, in both places). The advantage of the email is that the user will have a place to reference that link as long as he/she can access that email.
To insert the download link in the confirmation email, tick the Send Confirmation Email to User box in the Form Settings area whilst editing your form. Then click the Customise Confirmation Email button, which will open a pop-up window where you can customise the content of that email.
Where can I host my files?
Notice in the above code examples that we linked to the files with URL such as
http://yourwebsite.com/file.doc. This is an example where you have your own domain name and your own server where you can upload and host your own files. If you don’t have that, there are web services out there that can help you host files and make them available for public download. All of these have free options:
Dropbox is a service which syncs files between your computer and their servers (and possibly your other computers). Files in your “Public” folder have public URLs to them.
What if I want to attach the files in the email?
Although we don’t have that feature built into Wufoo, if you’ve got a little bit of programming nouse, you can check our really easy tutorial about how to use our Webhooks API to send emails with the attachments directly from your own web server.