Paperform javascript issues
-
Hi,
A client asked to embed a Form that was made with Paperfrom, I embeded the code but there is an issue with the javascript so somethimes the form is loaded correctly and sometimes it doesn't appear. Here link to the Site with the Form: https://musikvielfalt.ch/mitmachen/.I tried to deactivate all the Custom Code, tried to activate the "Disable Ajax / Compatibility Mode" as the "Enable Content Filter", but it didn't helped.
The support of Paperform answerd with this Mail:
"Formular: Ich habe da noch mit Support von Paperform gesprochen, da sich das Problem bei mir in einem anderen Browser doch wieder gezeigt hat.It sounds like there may be a problem on your website where the form is embedded, as opposed to the form itself.
I've just added your embed code from the website to a barebones HTML page and can confirm everything is working as expected.
I took a closer look into your website, and can see that the iframe src attribute is being reset to "" when the form loads the second time. Are you running any other external scripts?
Currently I can see your page loading the following scripts:
https://musikvielfalt.ch/wp-includes/js/jquery/jquery.min.js?ver=3.7.1
https://musikvielfalt.ch/wp-includes/js/underscore.min.js?ver=1.13.4
https://musikvielfalt.ch/wp-includes/js/backbone.min.js?ver=1.5.0
https://musikvielfalt.ch/wp-content/themes/lay/frontend/assets/vendor/backbone.radio.js?ver=5.5.3
https://musikvielfalt.ch/wp-content/themes/lay/frontend/assets/vendor/swiper.js?ver=5.5.3
https://musikvielfalt.ch/wp-content/plugins/mailin/js/mailin-front.js?ver=1707733135
https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js
https://paperform.co/__embed.min.js → this is Paperform
https://musikvielfalt.ch/wp-content/themes/lay/assets/js/vendor/marionettev3/backbone.marionette.min.js?ver=5.5.3
https://musikvielfalt.ch/wp-content/themes/lay/frontend/assets/js/vendor.min.js?ver=5.5.3
https://musikvielfalt.ch/wp-content/themes/lay/frontend/assets/js/frontend.app.min.js?ver=5.5.3
Some of these scripts load various other functions within inline scripts, which may be interfering with the iframes inserted with paperform.Ich vermute es liegt an: "https://musikvielfalt.ch/wp-content/themes/lay/assets/js/vendor/marionettev3/backbone.marionette.min.js?ver=5.5.3
https://musikvielfalt.ch/wp-content/themes/lay/frontend/assets/js/vendor.min.js?ver=5.5.3
https://musikvielfalt.ch/wp-content/themes/lay/frontend/assets/js/frontend.app.min.js?ver=5.5.3"Ich kann das Problem aktuell nicht nachvollziehen, ich muss verschiedene Plugins deaktivieren und testen."
Lay Team & Friends, any help how to make it work?
Danke! -
@Armin-Unruh could you (or someone else) have a look? Thanks!
-
hey!
did you put the form there with a shortcode?
or +more -> +htmlcan u try both?
yea, enabling
"Disable Ajax / Compatibility Mode"should help
-
Thanks Armin and sorry for the late replay!
I've put it as +HTML, tried also as shortcode. With the shortcode nothing shows up... with HTML sometimes yes, sometimes no...
For the moment i will put the HTML in a subdomain page, but if there could be a easier solutions to keep it in the main domain it would be great! -
can you send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
let me take a look at that page in /wp-admin/ and see if i can make it work
-
so i looked at the website and there are many different ways of embedding the paperform. for example as a popup:
https://kudeguty.cyon.site/mitmachen/
the html on your page should be like this:
and then i put this in lay options → custom css & html → custom head content:
<script src="https://paperform.co/__embed.min.js"></script> <script> window.laytheme.on('newpageshown', function(){ if(jQuery('body').hasClass('slug-mitmachen')){ Paperform.popup('musikvielfalt') } }) </script>
you could also try the iframe method of embedding it
i unchecked "Disable Ajax / Compatibility Mode" again, cause this also works with it unchecked
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it