Can I speed up my embedded form's load time?

The standard Paperform embedding method is built to avoid impacting the overall load speed of the page. To do this, it doesn’t actually start loading the form until the essentials of your page have finished loading.

If the form is an integral piece of the page content, you can do a few things to increase the speed at which the form loads.

Use a standard script

One of the simplest and most effective changes you can make to speed up the loading of the form is to replace the <script> part of your embed with a standard <script> element (as opposed to using JavaScript).

Examples of both scripts can be found below, of which the Original Script should be replaced by the New Script Element:

Original Script

<div data-paperform-id="FORM_SLUG"></div>
<script>
  (function() {
    var script = document.createElement('script'); 
    script.src = "https://paperform.co/__embed.min.js"; 
    document.body.appendChild(script); 
  })()
</script>

New Script Element

<div data-paperform-id="FORM_SLUG"></div>
<script src="https://paperform.co/__embed.min.js"></script>

In both of these examples, FORM_SLUG should be replaced with the value in your normal embed code.

Place a standard embed script in the page head

You can also try placing a standard embed <script> element between the <head></head> tags of your webpage. It should be placed as high as possible in the document, preferably just after the initial <head> tag for best results.

The script you should place is listed below:

<script src="https://paperform.co/__embed.min.js"></script>

iFrame Fallback Method

A third and final method to speed up embedded forms is to use our <iframe> fallback method. Please note the gotchas and caveats listed in our documentation for this method, we recommend reviewing these first to prevent unexpected changes in form behaviour when embedding.