Prepopulate a field with Classic ASP Variable

  • Profile Image
    consumers
    Asked on August 03, 2017 at 09:48 AM

    I have a form I want to add some data that is in an ASP Variable , specifically <%=referer%>.

    I test it just before the JavaScript call and it is populated.

    Yet it does not show on my form

    <script type="text/javascript" language="JavaScript">

        alert("<% =referer %>")

    </script>

       <script type="text/javascript" language="JavaScript" src="https://form.jotformpro.com/jsform/72134511411946??typeA7='+"<% =referer %>+'" > </script>

    I followed the other posts on the support forum, but still no good. Any idea what I am doing wrong?

  • Profile Image
    david
    Answered on August 03, 2017 at 12:52 PM

    Would you mind sharing the URL of the page you added the form to?  I am honestly not too familiar with VB so I am not sure if the variable can be used as a URL parameter as you are attempting to.  You can try using the source code of the form and populating the field directly instead of via the URL parameter:

    https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form

  • Profile Image
    consumers
    Answered on August 03, 2017 at 12:59 PM

    Realized the Field Content was a url with Ampersands. Ampersands in the the string was the issue.

    I broke up the content and concatenated it together without Ampersands. 

    BTW: The field was not the calling page.

    Problem fixed.