Hi there,
I’m trying to embed the Typeform, that should pop up when pressed by any of the CTA buttons across multiple pages (multiple on the same page too).
For some reason, it only works for one button (using the ID option). Here’s the code.
<script src="//embed.typeform.com/next/embed.js"></script>
<link rel="stylesheet" href="//embed.typeform.com/next/css/popup.css" />
<script>
const { open, close, toggle, refresh } = window.tf.createPopup('<form-id>')
document.querySelector('#lead-form').onclick = toggle
</script>
I tried it with querySelectorAll, but that doesn’t work either.
Would love getting some guidance on how to solve this. Thanks!