Skip to main content

Signup popup isn't showing on the button click

  • May 3, 2024
  • 1 reply
  • 27 views

Forum|alt.badge.img

Hi there, 

I need to open signup form in popup on the button click so I have created signup form and select form type to popup, and added the code for custom trigger in the below page. 

https://dev.georgiemane.com/collections/frontpage/products/hair-mask?no_rule=true

I need to open the popup on the “ADD TO WISHLIST” button click, so i have added the below code:

<a href="javascript:void(0);" class="pre_load_btn js_pre_load_btn2 btn btn--primary">
  <span data-add-to-cart-text>ADD TO WISHLIST</span>
</a>
<script type="text/javascript"> document.querySelector('.js_pre_load_btn2').addEventListener('click', function (){ window._klOnsite = window._klOnsite || []; window._klOnsite.push(['openForm', 'form_id']); }); </script>

But the popup isn’t showing on the button click. I make sure that anything isn’t missing and is setup correctly, but I am not getting an issue.

Can anyone help me with this? Thanks in advance.

Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Taylor Tarpley
Community Manager
Forum|alt.badge.img+60

Hi there @brijeshjasoliya

 

I see a fellow Community Champion has answered a similar post you created below. For future reference, you only need to post once to have your question seen and answered :).

 

-Taylor