Loading of the form is too slow

  • Jelco
    Asked on June 22, 2016 at 10:20 AM

    im having slow loads a.t.m.

    http://www.ikwileenquooker.nl/quooker-samenstellen

    Taking ages

  • jonathan
    Replied on June 22, 2016 at 10:28 AM

    I test the form https://www.jotformeu.com/form/61732862554359 itself but I did not encounter the slow loading form.

    But the website http://www.ikwileenquooker.nl/quooker-samenstellen itself seems to be the one taking longer to load on the browser.

    I suggest you try also re-embedding your form on the website using instead its iframe embed code

    User guide: https://www.jotform.com/help/148-Getting-the-form-iFrame-code

    This is to make sure script conflict will not be a factor in the loading issue of the form.

    Let us know if issue still persist even after re-embedding the form.

  • Jelco
    Replied on June 22, 2016 at 1:23 PM

    im using the iframe now but it shows so much white spance at the bottom, can i change this?

  • BJoanna
    Replied on June 22, 2016 at 3:15 PM

    Height of your iFrame code is set to 5111px.

    <iframe id="JotFormIFrame" style="width: 100%; height: 5111px; border: none;" src="https://form.jotformeu.com/61732862554359" frameborder="0" scrolling="no"></iframe>

    You can change the height of your iframe code.

    You can also get new iFrame code of your form and re-embed it to your website. 

    <iframe

          id="JotFormIFrame"

          onDISABLEDload="window.parent.scrollTo(0,0)"

          allowtransparency="true"

          src="https://form.jotformeu.com/61732862554359"

          frameborder="0"

          style="width:100%;

          height:539px;

          border:none;"

          scrolling="no">

        </iframe>

    Hope this will help. Let us know if you need further assistance. 

  • Jelco
    Replied on June 23, 2016 at 5:24 AM

    thanks, fixed that but yet another small problem.

     

    When i fill in the form now, and i want to go to the next page it doesnt go back to the top of the form. My second question is much longer then third, if you click next on question 2 you dont see question 3... If there anything to fix that?

    Got height: 1800px only way i can kinda fix it is by using scrollbar...

  • BJoanna
    Replied on June 23, 2016 at 7:38 AM

    When next button on your form is clicked page does not go back to the top of the form, because this part of the code is missing from your iFrame code. 

    onDISABLEDload="window.parent.scrollTo(0,0)"

    Please add that part of of the code to your iFrame code. Your code should look like this:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" style="width: 100%; height: 1800px; border: none;" src="https://form.jotformeu.com/61732862554359" frameborder="0" scrolling="yes"></iframe>

    Hope this will help. Let us know if you need further assistance. 

  • Jelco
    Replied on June 24, 2016 at 5:28 AM

    Still in need of bit more support... Im using joomla but when i copy the code joomla removes the onload part.

    You happen to know a solution for that aswell?

  • Chriistian Jotform Support
    Replied on June 24, 2016 at 6:18 AM

    May I know how did you add the code on your Joomla page? Are you using Joomla 3? If so, you can check this guide on how to add the script/iframe code in your site: How to embed form to Joomla 3. For more information, you can also check our guides on how to embed form on different version of Joomla: http://www.jotform.com/help/keyword_search.php?rpp=0&search=joomla

  • Jelco
    Replied on June 25, 2016 at 4:48 AM

    Im using joomla 3 indeed and i did follow the instructions, but still no result.

    {source}
    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" style="width: 100%; height: 1800px; border: none;" src="https://form.jotformeu.com/61732862554359" frameborder="0" scrolling="yes"></iframe>
    {/source}

  • Jelco
    Replied on June 25, 2016 at 4:55 AM

    Found the solution...

    I copied the code from the form directly, and it worked

     

        <iframe

          id="JotFormIFrame"

          onDISABLEDload="window.parent.scrollTo(0,0)"

          allowtransparency="true"

          src="https://form.jotformeu.com/61732862554359"

          frameborder="0"

          style="width:100%;

          height:539px;

          border:none;"

          scrolling="no">

        </iframe>

        <script type="text/javascript">

          window.handleIFrameMessage = function(e) {

            var args = e.data.split(":");

            var iframe = document.getElementById("JotFormIFrame");

            if (!iframe)

              return;

            switch (args[0]) {

              case "scrollIntoView":

                iframe.scrollIntoView();

                break;

              case "setHeight":

                iframe.style.height = args[1] + "px";

                break;

              case "collapseErrorPage":

                if (iframe.clientHeight > window.innerHeight) {

                  iframe.style.height = window.innerHeight + "px";

                }

                break;

              case "reloadPage":

                window.location.reload();

                break;

            }

            var isJotForm = (e.origin.indexOf("jotform") > -1) ? true : false;

            if(isJotForm && "contentWindow" in iframe && "postMessage" in iframe.contentWindow) {

              var urls = {"docurl":encodeURIComponent(document.URL),"referrer":encodeURIComponent(document.referrer)};

              iframe.contentWindow.postMessage(JSON.stringify({"type":"urls","value":urls}), "*");

            }

          };

          if (window.addEventListener) {

            window.addEventListener("message", handleIFrameMessage, false);

          } else if (window.attachEvent) {

            window.attachEvent("onmessage", handleIFrameMessage);

          }

          if(window.location.href && window.location.href.indexOf("?") > -1) {

            var ifr = document.getElementById("JotFormIFrame");

            var get = window.location.href.substr(window.location.href.indexOf("?") + 1);

            if(ifr && get.length > 0) {

              var src = ifr.src;

              src = src.indexOf("?") > -1 ? src + "&" + get : src  + "?" + get;

              ifr.src = src;

            }

          }

          </script>

  • Welvin Support Team Lead
    Replied on June 25, 2016 at 8:55 AM

    That's great to know. Please contact us again if there are any problems.