What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to capture referral URL for form embedded with iFrame?

    Asked by eiermann on December 01, 2016 at 02:58 AM

    Hi there! 

    We have embedded this URL via an iframe on villa-bali.com. When someone completes a form submission it will show our domain (thingstodoinbali.com) though. 

    Is there a way the referrer widget recognises the actual domain the form was filled in from? Or is there a way to add a parameter to see that the form was actually filled in from villa-bali.com using an iframe linked to thingstodoinbali.com?

     

    Looking forward to your reply!

    Cheers,

    Chris

     

  • Profile Image
    JotForm Support

    Answered by ashwin_d on December 01, 2016 at 03:53 AM

    Hello Chris,

    Yes it is possible to achieve your requirement by adding "Get Form Page URL" widget in your form. This widget will capture the parent page URL of the Form.

    You may like to take a look at the following guide which should help you:  https://www.jotform.com/help/287-Include-Referrer-in-form-within-IFRAME 

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image

    Answered by eiermann on December 01, 2016 at 04:23 AM

    Awesome! Will try that asap!

  • Profile Image
    JotForm Support

    Answered by Nik_C on December 01, 2016 at 04:56 AM

    Please do and let us know if it helps.

    Thank you!

     

  • Profile Image

    Answered by eiermann on December 01, 2016 at 10:54 PM

    Unfortunately it is not working as expected. It doesn't capture the right url. Is this a known bug of the widget that it doesn't work with iframes?

    I was filling in the this form from this page. (Agung Trekking)

    Screenshot

  • Profile Image
    JotForm Support

    Answered by ashwin_d on December 02, 2016 at 02:51 AM

    Hi eiermann,

    I did check the screenshot you have shared and it seems the "Get Form Page URL" widget seems to work as expected. The form which you have embedded is webpage is actually being captured correctly. Please check the below screenshots:

     

     

    Please note that "Get Form Page URL" captures the URL where the form is embedded.

    Can you please let us know what is the issue you are having? 

    We will wait for your response.

    Thank you!

  • Profile Image

    Answered by eiermann on December 02, 2016 at 04:11 AM

    Oh I was expecting the Get Form Page URL can detect the URL where the iframe is. Is there a way to discover from what URL the iframe to my page was embedded?

  • Profile Image
    JotForm Support

    Answered by Nik_C on December 02, 2016 at 05:14 AM

    Get Form Page URL will include the page URL of the form that is submitted and it will include the link in submission, for example like this:

    So if the form is embedded somewhere, iframe or some other embed type, you can still use this widget to get the URL. Now, I"m not sure if you had something else in mind maybe?

     

  • Profile Image

    Answered by eiermann on December 07, 2016 at 04:10 AM

    Hi Nik, 

    when you open this page and then click on "Mount Batur Trekking" and then book now in fill in the booking form the URL remains www.villa-bali.com but in the booking it says thingstodoinbali.com. 

    villa-bali.com loads thingstodoinbali.com/villa-balicom in an iframe. But how can I see that the submission was actually filled in from villa-bali.com?

  • Profile Image
    JotForm Support

    Answered by olivia on December 07, 2016 at 05:41 AM

    Hi,

    It is seen that your form is actually embedded in thingstodoinbali.com/villa-balicom and you embedded thingstodoinbali.com/villa-balicom into villa-bali.com/en/activities, too. Therefore, when someone submits your form in villa-bali.com/en/activities, Get Form Page URL captures the thingstodoinbali.com/villa-balicom because of iFrame, not villa-bali.com/en/activities.

     

    Unfortunately, JotForm has no such a feature. You can get only the form URL with Get Form Page URL Widget. 

    My suggestion is to embed your form into these two websites separately. This is the easiest way to get correct URL of the submitted form.

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

    Thank you.

  • Profile Image

    Answered by eiermann on December 07, 2016 at 11:05 PM

    Hi Olivia. 

    If it would capture the URL /villa-balicom that would be alright since we could see from there that it was filled in from villa-bali.com. Unfortunately the forms can't be filled in from this page. The user has to decide for one activity and then the URL won't be /villa-balicom anymore but (for example) /trekking/mount-batur-trekking. Any other idea how to add a parameter or something to the end of the URL like /trekking/mount-batur-trekking/?ref=villa-bali.com

     

    Cheers,

    Chris

     

  • Profile Image
    JotForm Support

    Answered by ashwin_d on December 08, 2016 at 12:35 AM

    Hello Chris,

    Yes is is possible to add parameter in the iFrame embed code to populate the value in a hidden field. Please take a look at the following guide which should help you with this workaround solution: https://www.jotform.com/help/84-How-to-Know-which-Page-or-Form-the-Submission-Came-From

    Hope this helps.

    Do try out and get back to us if you have any questions.

    Thank you!