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?

icon

Best answer by mathio 25 May 2022, 10:15

View original

2 replies

Userlevel 7
Badge +5

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" />

 

Userlevel 7
Badge +5

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

Reply