Same form in 2 different pages, is it possible to identify where user contacted from?

  • Profile Image
    departamentoengeselll
    Asked on April 01, 2011 at 06:40 PM

    Hello!

     

    I have same contact form in 2 pages on my website, 1st is at home, at very bottom of page,

    but the other in "contact" page itself. I'd like to know in which page exactly are they filling the form I receive in my email, because if everybody is using my form on contact page, perhaps I'll get rid of my form on "home" page.

    Is there a way to do so? I couldn't figure it out.

  • Profile Image
    allanftd
    Answered on April 01, 2011 at 07:49 PM

    Hi departmentoengeselll,

    Thank you for contacting us regarding your concern. With JotForm, it is possible to identify which page the enquiry form your visitor has filled out came from. Please follow these steps: 

    1) Open your form in editing

    2) On the left accordion menu put a hidden field on your form (on Power Tools> Hidden box)

    3) Change the label of your field to "pageAddress"

    4) Save your form.

    5) Take the full source code of your form (Share>Advanced Options> Full Source code)

    6) There should be a similar line below right before the tag </form> starting with

    <input type="hidden" class="form-hidden" ...

    <input type="hidden" class="form-hidden" value="" id="input_5" name="q5_pageaddress5" />

    Keep note of the id of this line. For this example it is input_5

    7) Paste the html source code of your form to your page but you will need to add these lines right after </form> tag

    <script>

    document.getElementById('input_5').value=location.href;

    </script>

    NOTE: I have used the id I have found in step 6 in the code. You will need to change the input_5 with your id that you have found in step 6.

    Please try the steps above and let us know if it works for you or not.  Thank you for using JotForm!

    JOTFORM SUPPORT

  • Profile Image
    departamentoengeselll
    Answered on April 05, 2011 at 05:07 PM

    Hello !

    Sadly no, it didn't work at least on Google Sites where my site belongs. The reason is you need to add the form as a widget. So when you try to look at html code in page, you really don't see the full html code you can see in Jot form via full code.

    Tried adding the code

    <script>
    document.getElementById('input_5').value=location.href;
    </script>

    (In my case changed that id to corresponding one)

    After the insertion of form in Google sites in <HTML> code, but when you try to save (update) the addition, says that's no safe content and just deletes it.

    My understanding is that you can't paste full html code in Google sites like to try it.

     

    I guess anyway I must add to my email notification settings, the input_5 variable to receive the result right?

    However can't do so in Google Sites at least... a real pitty.

     

    I wonder if is there a similar mechanism to get the referrer site (the website user came from before filling the form)

  • Profile Image
    NeilVicente
    Answered on April 06, 2011 at 02:06 AM

    Hi,

    You may try inserting a hidden box to your form then prepopulate it using url parameters on your iframe embed code. Check out my solution in another thread and see if it will work for you - How Can I Differentiate When I Use the Same Form on Different Sites?

    Of course you need to use the iframe embed codes and insert it into your pages. Do not forget to append the url parameters at the end of the url in the embed code.

    Let us know if that solution works for you or not. Get back to us if you have further questions.

    Regards,
    Neil

  • Profile Image
    allanftd
    Answered on April 06, 2011 at 02:13 AM

    Hi there,

    Thanks for clarifying. Indeed, Google Sites can sometimes be prohibitive when it comes to introducing lins of codes other than HTML. With the situation you are in, I believe this tutorial may be helpful: 

    http://www.jotform.com/answers/19992-How-Can-I-Differentiate-When-I-Use-the-Same-Form-on-Different-Sites

    Please let us know if it works for you. If you have any other questions or concerns, please let us know. Thank you for using JotForm!

    JOTFORM SUPPORT