How can I capture unique data about what page a user was on when submitting a form?

  • Profile Image
    Asked on April 25, 2012 at 07:43 PM

    I have a contact form on the left column of a rental company website. The company has 1000+ products, and currently there is no way to tell which page (or product) a website visitor is referring to when they submit a contact request. For example, a submission might read "Name= Mike Williams   Number=320-222-2222   Comment=How much to rent 500 of these from July 5 to July 10. Is there a way to pass/capture the page title or URL or something so we know which item/page generated the submission?


    Here is a link to a page for a Bobcat rental, you'll see the contact form in the left column of the page:

    The same form is being used on all inventory pages of this website.


  • Profile Image
    Answered on April 25, 2012 at 08:30 PM


    Please correct me if wrong, I observe the navigation on the inventory page.
    Everytime I click an item inventory (Bobcat,Lift, Tractor etc...) it is a new Html page?

    Does this mean that the Contact form is embedded several times on each html page?
    Or it is only 1 Contact Form embedded on the left frame only.

    If it is several embedded form on each html page, you can add a hidden field and put value on it relating to the current inventory item on that page. So that when this form is submitted, you will have data on which html page(inventory item) the user was at  the time.

    Please update us if this help sorted it out. Thanks.


  • Profile Image
    Answered on April 25, 2012 at 08:32 PM

    I am sorry, I was not reading your question properly. It seems it is only 1 Contact Form.

    I'll check further.

  • Profile Image
    Answered on April 25, 2012 at 08:55 PM


    There is already a specific input field in the Contact form already."Product of Interest"

    Does this sorted this out already?


  • Profile Image
    Answered on April 25, 2012 at 09:03 PM

    Adding that field "Product of Interest" was my 1st attempt at solving this problem, however, users aren't being specific when completing the field. For example, they might say "chairs" when there are 15 differernt chair options.

    The form is embended into the Magento Theme within "left column", so it appears dynamically on every page using the 2-column-left layout (which is all product pages)

  • Profile Image
    Answered on April 25, 2012 at 09:23 PM

    Thank you. I understand better now. And you are correct, using the input text box "Product of Interest" is not solid solution as the user can put anything they want on it.

    Somehow I am looking for a hidden field within the html field that we can at least call on the Contact form before submission.
    For example in forklift.html I saw hidden input field "products" with value='206'.
    I wonder if this is related to the current inventory item on the page and if we can use it as the unique data in the Contact form.

    There is also the POST method in submission data that can be explored.

    I'll check further if I can provide a working sample. Will update you when I got one.

  • Profile Image
    Answered on April 26, 2012 at 07:06 AM


    As committed previously, here is my update.

    First, I will inform you ahead that the embed method I used was source code. 
    1. Goto Setup & Embed
    2.Embed Form
    3. select Source

    I am not sure if this should be an issue on your website but better I inform you ahead.

    I cloned your contact form, added an additional hidden field and embedded it here.
    Since I am using the source, I was able to inject a javascript within the <form> source code.

    <script type="text/javascript">
    document.getElementById('input_10').value = document.URL;

    The 'input_10' is the hidden field added.
    I added the hidden field in the email notification(see screen below) 

    If you test the sample page, you can check the email notification here.
    You can also right-click on the sample page, then view source to see what I did. 

    Please inform us if this work for you. Thanks.




  • Profile Image
    Answered on April 30, 2012 at 04:18 PM

    Jonathan, thank you for your help on this, your solution worked flawlessly. Appreciate the prompt assistance, and viable solution.

    - Justin

  • Profile Image
    Answered on April 30, 2012 at 04:21 PM

    In behalf of my colleague jonathan, you're welcome and good to hear that your form is now working properly. 

    If you need further assistance, feel free to contact us anytime.

    Thank you for using JotForm!

  • Profile Image
    Answered on December 06, 2012 at 07:39 AM

    Is this feature going to be implemented a little more userfriendly in the near future?


  • Profile Image
    Answered on December 06, 2012 at 08:13 AM

    Hi there, 

    Thanks for your input!

    You can request this feature on a separate thread so that we can pass it on to our dev team.

    Once the request is submitted, the priority of the ticket gets meassured according to the number of people asking for such feature.   

    Thanks again for your feedback and we'll look for your new thread!