Why won't my sign up form display for my custom trigger?

  • 4 April 2023
  • 1 reply



so far Ive used successfully a button to trigger a sign-up form (as described in your documentation), but now once clicked the button doesnt trigger the sign up form any more. Can you help? Here the code I added with the correct ID: 


<button class="klaviyo_form_trigger">Newsletter</button>
<script type="text/javascript">// <![CDATA[
document.querySelector('.klaviyo_form_trigger').addEventListener('click', function (){
        window._klOnsite = window._klOnsite || [];
window._klOnsite.push(['openForm', 'XyY63S']);
// ]]></script>

Is there any mistake? Its behaviour is set on only show on custom trigger


Best answer by Taylor Tarpley 4 April 2023, 23:24

View original

1 reply

Userlevel 7
Badge +59

Hi @Eva_Anna


Welcome to the Community! Thanks for sharing your question with us! 


Sorry to hear you’re experiences issues with your custom trigger! While we can’t provide help with your site’s specific HTML, I will mention that if your form was working successfully, but then stopped, you should go over your script with a fine-tooth comb and make sure that your gaps are in the right place and aren’t any extra / missing letters. I’d specifically look over his part of our documentation  that shares the exact code you’ll need as well as our developer doc  on the subject as well. 


If you still are having trouble, I’d recommend reaching out to one of our partners for help!  


Thanks for participating in the Community!