Skip to main content
Solved

Link a sign-up form to a Shopify button

  • September 29, 2022
  • 1 reply
  • 265 views

Forum|alt.badge.img+3

Hello ! I want to link a sign-up form to this “?” button. Can you help me please? :)

 

Best answer by alex.hong

Hi there @megan_lheureux ,

Welcome to the Community.

I would recommend checking out this doc first and then coming back if you run into errors. The first thing you will need to do is to create the form using the generic code snippet that is in the article. You can also custom code your own form if you have some coding knowledge. 

After you have pasted this code snippet into your page (typically right before the last <body> tag on the page), you need to add this code snippet right below it:

<script type="text/javascript" src="//www.klaviyo.com/media/js/public/klaviyo_subscribe.js"></script> <button onclick="KlaviyoSubscribe.attachToModalForm('#k_id_modal',{delay_seconds: 0.01, hide_form_on_success: true, ignore_cookie: true, success_message: false});">Click me</button> 

I would start with getting this code onto your site, and then worry about the styling once you know if it works like you want it to.

 

Thanks,

Alex

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

1 reply

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • September 29, 2022

Hi there @megan_lheureux ,

Welcome to the Community.

I would recommend checking out this doc first and then coming back if you run into errors. The first thing you will need to do is to create the form using the generic code snippet that is in the article. You can also custom code your own form if you have some coding knowledge. 

After you have pasted this code snippet into your page (typically right before the last <body> tag on the page), you need to add this code snippet right below it:

<script type="text/javascript" src="//www.klaviyo.com/media/js/public/klaviyo_subscribe.js"></script> <button onclick="KlaviyoSubscribe.attachToModalForm('#k_id_modal',{delay_seconds: 0.01, hide_form_on_success: true, ignore_cookie: true, success_message: false});">Click me</button> 

I would start with getting this code onto your site, and then worry about the styling once you know if it works like you want it to.

 

Thanks,

Alex