Prepopulate a field with Classic ASP Variable

  • consumers
    Asked on August 3, 2017 at 9: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?

  • David JotForm Support
    Replied on August 3, 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

  • consumers
    Replied on August 3, 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.