How do I create one form where on submit of the form, the user will be directed to a different whitepaper depending on the url they came from?

  • Profile Image
    TammiB
    Asked on February 22, 2012 at 01:01 PM

    Right now I have two different whitepapers that when the user clicks a link to download the whitepaper, they will be directed to my form.  Once they enter their information and click on the submit button, I would like it to open the url to the whitepaper.

    I have created a hidden box called whitepaper. 

    I have also created two conditions

    where when whitepaper = whitepaper1(url) then redirect to whitepaper1

    where when whitepaper = whitepaper2(url) than redirect to whitepaper2

    I found this embed code for "How to Know the Exact URL of a Page where a Form Submission is Made"

    <script type="text/javascript">document.write("<script src=\"http://form.jotform.com/jsform/20392905723?whitepaper=" + window.location.href + "\"></" + "script>");</script>

     

    What I'm getting is a Thank You for Your Submission page instead of the whitepaper.

    The whitepaper hidden field is showing as the url of the form page when I really want it to show the url of the page that has the link to the form.

    I am using DNN.  Any idea if what I'm trying to accomplish is possible and if so what am I doing wrong?

    Thanks!

  • Profile Image
    fxr
    Answered on February 22, 2012 at 03:37 PM

    Can you please try updating your embed code to this:

    <script type="text/javascript">document.write("<script src=\"http://www.jotform.com/jsform/20392905723?whitepaper=" + window.location.href + "\"></" + "script>");</script>

    There may another couple of issues here, but can you check if changing that iniates a download of a PDF?

    You may well be able to work out what to do next once you have that part working as you would expect. 


  • Profile Image
    TammiB
    Answered on February 22, 2012 at 04:29 PM

    I actually got it working but have another question, is there a way that I can have the whitepaper come up in it's own window?

  • Profile Image
    TammiB
    Answered on February 22, 2012 at 04:33 PM

    I actually got it working but have another question, is there a way that I can have the whitepaper come up in it's own window?

  • Profile Image
    fxr
    Answered on February 22, 2012 at 06:38 PM

    No, its a PDF file, most browsers won't be able to render it, so the end user will just be given the option to download it. 

     

    You could create a seperate page for each of the pdfs containing a link to download the relevant PDF, and set you your redirects to those pages.  

  • Profile Image
    TammiB
    Answered on February 23, 2012 at 09:34 AM

    Thank You!