How to add form as a lightbox button on Wordpress

  • diademconsulting
    Demandé le 14 juin 2023 à 11:51

    Bonjour, je vous écrit car l'intégration de mon formulaire semble avoir un bug d'affichage.


    J'ai utilisé l'intégration Lightbox, sur un site WordPress avec le thème Divi.

    Lorsque j'intègre une seule fois le code, cela se passe bien.


    En revanche, si je souhaite placer plusieurs liens d'appel à l'action sur la même page, l'affichage est étrange (voir capture)


    Il y a t-il une possibilité de faire apparaître plusieurs boutons de type lightbox ?

    Cordialement,

    Jotform Thread 5243827 Screenshot
  • Rhina Jotform Support
    Répondu le 14 juin 2023 à 14:27

    Hi diademconsulting,

    Thanks for reaching out to Jotform Support. I'd like to let you know that I am using a translation tool to provide assistance but if you would prefer to get assistance in French language, we can forward your ticket to our French team. However, please note that it could take longer to receive a response. 

    Can I ask for the link to the web page where the form is embedded so we can further check? To clarify, are you embedding the form on a webpage using the Lightbox embed option? If so, please make sure to get the Lightbox code by following the steps here when embedding your form. If you want to add the Lightbox code as a button on Wordpress you can follow the workaround below:

    1. Paste the Jotform Lighbox embed code into a Custom Html Block Editor
    2. Add the WordPress button code wp-block-button__link to the classes in the code:
     <a class="wp-block-button__link btn lightbox-231576624085056" style="margin-top: 16px">
    Diadem Consulting
    </a>

    Give it a try and let us know how it goes.

  • diademconsulting
    Répondu le 15 juin 2023 à 04:40

    Hello Rhina,


    Thank you for your message.


    I tried to integrate your code, but it doesn't work anymore when I try to have several buttons.


    I used the "Lightbox" function as shown in the video.


    Here's the link where you can find the 3 buttons I inserted, with the display bug: 

    https://diadem-consulting.com/


    Thanks in advance

    Michael

  • Bruce Project Specialist
    Répondu le 15 juin 2023 à 09:38

    Hi diademconsulting,

    Thanks for getting back to us. When I checked your website, I saw that you embed your form 3 times with the iframe method. That's why it looks broken.

    How to add form as a lightbox button on Wordpress Image 1 Screenshot 20

    Can you delete the other 2 iframes and try again? If you're still having the same issue, we'll do a more in-depth investigation and work on finding a solution.

    Once we hear back from you, we'll be able to move forward with a solution.

  • diademconsulting
    Répondu le 15 juin 2023 à 09:47

    Yes, I've integrated the form 3 times because I want to create three different buttons to the form along my sales page. Isn't it possible to have several links? 

  • Ryan Jotform Support
    Répondu le 15 juin 2023 à 14:30

    Hi diademconsulting,

    Thanks for getting back to us. Yes, It is possible. However, you are currently using the Iframe Embed Code which is why it is showing the entire form instead of a button. You might want to use the Lightbox embed code instead. This guide will show you how to do that.

    Reach out again if you have any other questions.

  • diademconsulting
    Répondu le 15 juin 2023 à 16:13

    Thank you for your message. 


    However, I can confirm that I did use the lightbox code (and not the iframe code).


    I pasted the code that was generated in Jotform in exactly the right place :

    How to add form as a lightbox button on Wordpress Image 1 Screenshot 20



  • Ryan Jotform Support
    Répondu le 15 juin 2023 à 16:29

    Hi diademconsulting,

    Thanks for getting back to us. Can you try to embed only one Lightbox code on your website and see if it resolves the issue?

    Give it a try and let us know how it goes.

  • diademconsulting
    Répondu le 15 juin 2023 à 16:30

    Hello, in the end I did things differently. I used a plugin (pop up maker) and integrated the Iframe code inside.


    Then added the pop-up class on a normal button. It seems to work.