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.
How Can I Increase the Performance of My Form on Wordpress?Asked by milkod2001 on February 26, 2016 at 05:31 AM
First of all, your jot forms are really amazing-piece of art.
Im trying to implement one the my forms i have created on WordPress and i want to find out what are the best practices to do so.
Form is working BUT(im getting this dform GT metrix):
page is loading and that unnecessary slows down website.
Form is implemented with iframe. That was only way how it worked.
My question is: IS there any way i can setup iframe to load only when is needed(when someone will click on link for form)?
Or is there any way how can i minimize the size of scripts which are coming with form. My form has only 2 fields to fill and submit part . Over 353kb feels like awful load for that little im getting.
Please help me with this.
If you embed the the whole iFrame embed code currently, we shorten its length and size by deleting the unnecessary script part. As it is seen from the below, you don't need to take the whole structure of the embed code, the content between <iframe>...</iframe> tags is enough to embed your form. (Following code is just an example, please don't embed that one.)
Please, try this method, it will optimize the page load times and also, don't forget to let us know the results.
I have only used what was sitting within iframe, implemented it, updated files, tested it again and the results are actually the very same:
I could live with 350kib of java scripts but i would like those scripts to load on website only if form is called for.
Currently it is only a link, it only display pop up window with form when clicked on this link. But it loads when page is loaded which unnecessary slow down website. Is there any way in iframe to tell it to load script only when needed/clicked on link?
According to my last searches, you can put your iFrame into a button and it start to work only on button click. Please, check the related page from the link below:
In addition to this, you can try to embed your form by using the default script embed code as it is mentioned on the guide about how to embed your code to Wordpress:
Thanks, i will give a stackoverflow solution a try
You are kindly welcome. Please, don't forget to let us know about the results.