Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Paperform javascript issues

Paperform javascript issues

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 134 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    riobasel
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • R Offline
      R Offline
      riobasel
      wrote on last edited by
      #2

      @Armin-Unruh could you (or someone else) have a look? Thanks!

      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        hey!

        did you put the form there with a shortcode?
        or +more -> +html

        can u try both?

        yea, enabling
        "Disable Ajax / Compatibility Mode"

        should help

        1 Reply Last reply
        0
        • R Offline
          R Offline
          riobasel
          wrote on last edited by
          #4

          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!

          1 Reply Last reply
          0
          • arminunruhA Offline
            arminunruhA Offline
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • arminunruhA Offline
              arminunruhA Offline
              arminunruh
              Global Moderator
              wrote on last edited by
              #6

              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:

              Screenshot 2024-05-16 at 19.14.41.png

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              I also code custom websites or custom Lay features.
              šŸ’æ Email me here: šŸ’æ
              info@laytheme.com

              Before you post:
              1. When using a WordPress Cache plugin, disable it or clear your cache.
              2. Update Lay Theme and all Lay Theme Addons
              3. Disable all Plugins
              4. 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:
              1. Post a link to where the problem is
              2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
              3. If the problem is difficult to explain, post screenshots / link to a video to explain it
              Online Users
              A
              alasdair17
              Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
              laytheme.com
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Search