close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Trigger Download with form submission

Thread began 11/20/2009 1:52 pm by takingchances6176651 | Last modified 11/23/2009 3:05 pm by Jason Byrnes | 2319 views | 5 replies |

takingchances6176651

Trigger Download with form submission

I built a form with formbuilder and integrated UEmail. Everything works fine.

However, what I am wanting to be able to do is make it to when the customer fills out the form (which is validated) and clicks the submit button it triggers the form to be sent but also triggers a file download. Can this be done with digital file pro and if so, how would I go about doing it?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, you can do this using Digital File pro.

You need to use the DFP Download File Server behavior.

Set the trigger to currant page submit.

You will need to supply the location on the server of the file to download and the file name.

Sign in to reply to this post

takingchances6176651

Ok. I got that to work, but I did not like it becuase it doesn't take the user to the "thank you" page that I have set up for the form. It keeps the user on the same page without taking them to the thank you page but it does download.

I tried setting the download to trigger once the user is sent to the thank you page by the form. I used "download before page is loaded". However, it still never shows the thank you page.

How can I make it so that the user fills out the form, it sends them to the thank you page, and then automatically triggers the download? But I need for them to see the thank you page.

Sign in to reply to this post

Jason ByrnesWebAssist

on the thank you page, add the Download behavior, set it to trigger on currant page submit.


Then add the following just before the </body> tag:

<form name="form1" method="post" action="<?php $_SERVER['PHP_SELF']?>?dl=true" style="visibility:hidden">
<label for="textfield"></label>
<input name="textfield" type="text" id="textfield" value="my val">
<label for="button"></label>
<input type="submit" name="button" id="button" value="Submit">
</form>
<script type="text/javascript">
if (!window.location.search.substring(1)) {
document.form1.submit();
}
</script>
Sign in to reply to this post

takingchances6176651

It's still not giving me the thank you page. It just downloads automatically but never shows the thank you page. You can go to download.php and fill out the form and see what I am talking about. Thanks so much for the help!

Sign in to reply to this post

Jason ByrnesWebAssist

you have added the form from my previous reply inside the head of the program_download.php Page, you need to move that form so that it is just before the </body> tag at the end of the page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...