How can I get the Tyeform Popup trigger on a button click in Elementor/ Wordpress? | Community
Skip to main content
Answered

How can I get the Tyeform Popup trigger on a button click in Elementor/ Wordpress?


I have Premium Buttons on Elementor. I want one of those buttons to open the Typeform in a popup window. How can I achieve that?

Best answer by mathio-tf

Hello @NeoPTS 

I am not familiar with this Wordpress plugin, however based on their docs you should be able to define custom onClick event.

In the onClick event you need to use custom JavaScript code to open your popup - like this:

window.tf.createPopup('<your-typeform-id>').open()

For the above JavaScript code to work correctly you also need to include our embed SDK and relevant CSS in your page (outside of the onClick event code):

<script src="//embed.typeform.com/next/embed.js"></script>
<link rel="stylesheet" href="//embed.typeform.com/next/css/popup.css" />

 

View original

2 replies

mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • Answer
  • May 25, 2022

Hello @NeoPTS 

I am not familiar with this Wordpress plugin, however based on their docs you should be able to define custom onClick event.

In the onClick event you need to use custom JavaScript code to open your popup - like this:

window.tf.createPopup('<your-typeform-id>').open()

For the above JavaScript code to work correctly you also need to include our embed SDK and relevant CSS in your page (outside of the onClick event code):

<script src="//embed.typeform.com/next/embed.js"></script>
<link rel="stylesheet" href="//embed.typeform.com/next/css/popup.css" />

 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14857 replies
  • May 31, 2022

Hi @NeoPTS Were you able to give the solution above a try? Let us know how it went!


Reply