Reference url previous page (link to form)
Last Post 03-19-2013 12:58 PM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
idas idasUser is Offline
new to the springs
new to the springs
Posts:2
Avatar

--
03-18-2013 04:04 AM

    I have a dynamic form on a specific page.

    There are links on several different pages that link to this same form.

     

    When a visitor submits the form they want to track which page linked to the form.

    Is there a way to track this and put this as a path/url/link in a mail to the administrator.

     

    Can someone help me out?

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    03-19-2013 12:58 PM
    Hello,

    I would recommend setting a JavaScript Cookie on each page before linking to the Dynamic Form(which you get to via multiple redirections from other pages):

    You will need to add the setCookie and will probably want to add the deleteCookie functions onto each of these pages in which you set the cookie.


    Embed these two functions into your pages:

    ---------------------------------------------------------------------------------------------------------------------------------------
    /*SET COOKIE FUNCTION*/
    function setCookie(name, value, days) {
    if (days) {
    var date = new Date();
    date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
    var expires = "; expires=" + date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
    }

    /*DELETE COOKIE FUNCTION*/
    function deleteCookie(name) {
    setCookie(name, "", -1);
    }

    ---------------------------------------------------------------------------------------------------------------------------------------

    Then when you set the Cookie, you can set the value as the current URL:

    setCookie('PageOrigin', document.URL, 1)

    PageOrigin = 'Cookie Name'
    document.URL = 'Value of Cookie'
    1 = Number of days before Cookie Expires


    Make sure that on your Dynamic Form you have a Hidden Field with the Short Field name of PageOrigin, or whatever you named the Cookie. Then make sure this Hidden field collects its value via Retrieving from a Cookie Variable. This is a setting under Advanced Question Options.

    Please let me know if you have any questions.

    Thanks,

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi