Skip to main content
Asked a question last month

I want to trigger a modal form when a visitor clicks a button. The form always opens in a separate tab and then only appears "on exit" as that is the trigger I've set because there is no "on click" option. I know I need to include the javascript to include the js file from convertkit to make the form appear on the same page. HOWEVER, I've been unable to find a way to do so using the Gutenberg editor. A custom HTML block doesn't work as WP apparently strips any script src="xxx" tags, or at least any that are not on the same domain as the site. I've also tried using some plugins but they either don't work (async loading) or wreak havoc with the page's design (normal loading), possibly because I can't put them directly above the form's trigger link. HOW TO DO THIS?

💡Make the most of your Community Member profile 

Share more about yourself! Click on your gravatar> profile > edit profile 

  • About You tab:
    • Photo: upload a picture of yourself or your brand
    • About You: let other community members know a little about you as a person, a creator, and anything else you'd like to add
    • Banner: add an image of your creator brand, logo, or an image that inspires your creativity
  • Social Media tab:
    • Let other members know where they can find you and your brand across social media platforms. This is a great additional step to connect with other creators in the industry!
Kristine
ConvertKit Community Specialists

Hey @Marjan Venema8, I see that you're trying to embed your modal form with a button. You need to copy the code that looks like this:

 

I want to trigger a modal form when a visitor clicks a button. The form always opens in a separate tab and then only appears "on exit" as that is the trigger I've set because there is no "on click" option. I know I need to include the javascript to include the js file from convertkit to make the form appear on the same page. HOWEVER, I've been unable to find a way to do so using the Gutenberg editor. A custom HTML block doesn't work as WP apparently strips any script src="xxx" tags, or at least any that are not on the same domain as the site. I've also tried using some plugins but they either don't work (async loading) or wreak havoc with the page's design (normal loading), possibly because I can't put them directly above the form's trigger link. HOW TO DO THIS?
I want to trigger a modal form when a visitor clicks a button. The form always opens in a separate tab and then only appears "on exit" as that is the trigger I've set because there is no "on click" option. I know I need to include the javascript to include the js file from convertkit to make the form appear on the same page. HOWEVER, I've been unable to find a way to do so using the Gutenberg editor. A custom HTML block doesn't work as WP apparently strips any script src="xxx" tags, or at least any that are not on the same domain as the site. I've also tried using some plugins but they either don't work (async loading) or wreak havoc with the page's design (normal loading), possibly because I can't put them directly above the form's trigger link. HOW TO DO THIS?

 Please check the instructions on this article - Trigger a modal with a link click10

Question Stats

56 view
1 follower
Asked a question last month
Views this month