How to catch form page URL with submission

  • 2adorable
    Asked on March 2, 2016 at 6:55 PM

    prepopulate form field with information on the page..

    i want to prepopulate a form field with information that is on that particular page ...

     

    for example ... i work at a car dealership and there is a separate page displaying each car... on every page i am going to paste in a script of my jotform form.. is there a code i can use to grab the url and paste it in a hidden field so that i can know which page the person applied on or... grab information from the page it self.. preferable the url. 

  • Chriistian Jotform Support
    Replied on March 3, 2016 at 12:20 AM

    It is possible to prepopulate the form fields by adding URL parameters to your form URL. Here's a guide that can help you set it up: Prepopulating fields to your JotForm via URL parameters

    If you need further assistance, do let us know and we would be glad to assist you.

     

  • 2adorable
    Replied on March 5, 2016 at 12:38 PM

    check this link out http://wefinancecars.ca/listings/2007-mazda-mazda3-sedan-grey-3999/

     

    what is i put a credit app on that page and when the customer fills out a credit app i want a hidden field that shows "2007-mazda-mazda3-sedan-grey-3999"

     

    how can i achieve this

  • jonathan
    Replied on March 5, 2016 at 10:26 PM

    Can you please describe more what you wanted to achieve.

    Do you want the form http://www.jotformpro.com/form/60606641913958 embedded on your website  to be pre-populated with existing  data/information coming from the website?

    How to catch form page URL with submission Image 1 Screenshot 30

     

     

    You can achieve this by embedding the form using its script embed and the pre-filling the fields with data from the other fields on the page.

    Ex: 

    http://wefinancecars.ca/credit-application/?emailAddress=jon@jon.com

    How to catch form page URL with submission Image 2 Screenshot 41

     

     

     

  • 2adorable
    Replied on March 6, 2016 at 9:56 PM

    yes thats what i want but ... i want it to automatically grab the vehicle type make and model and enter it into a hidden field in the form.. i have over 200 cars i cant use your solution for each and everyone.

     

    i am going to add a form to each page that has a car on it and i want to know what car the customer is filling out a form for but i do not want a extra question asking the customer that

  • 2adorable
    Replied on March 6, 2016 at 10:01 PM

    or even if i can use some sort of code to insert the url of the page they applied on then i would know the car 

  • Chriistian Jotform Support
    Replied on March 7, 2016 at 12:19 AM

    You can add a code to determine the URL of the page they applied on, however this would require using the full source code of your form. It is only possible to add custom Javascript to the form if you are using the full source code. Here's a guide on how to get the full source of your form: How to get the Full Source Code of your Form

    Then you can add a hidden input field where you can store the URL.

    1. Add the hidden field and determine the ID by clicking the gear icon and selecting Edit Properties.

    How to catch form page URL with submission Image 1 Screenshot 30

    2. You can see the ID of the field in the properties. In this example, the ID is input_22.

    How to catch form page URL with submission Image 2 Screenshot 41

    Then add this javascript in the html code:

    <script>

    var location = document.URL;

    document.getElementById("input_22").value = location;

    </script>

    If you need further assistance, do let us know.

  • 2adorable
    Replied on March 7, 2016 at 2:54 PM

    where do i enter the script code exactly? i tried it and it didnt work i created a form field i made it hidden and pasted the souce code and the imput ID was input_12 

  • Mike
    Replied on March 7, 2016 at 4:59 PM

    To catch the web page address I would like to suggest trying a Get Form Page URL widget. Drag and drop it to the form to collect the submission web URLs.

    How to catch form page URL with submission Image 1 Screenshot 20

    If you need any further assistance, please let us know.