Skip to main content
Solved

How to add SMS subscription field to a custom email signup form


Forum|alt.badge.img

I have a quiz page on my site and it gathers quiz information and then gets the customer email and submit all that data to klaviyo a subscribe to the emails. Now I want to add a new field in that quiz where customer would enter their phone number before entering the email and then after the email is submitted both email and SMS subscription should be added to that profile.

 

Here is the code I am using in the quiz page.

<form id="email_signup" class="klaviyo_gdpr_embed_My_list" action="" data-ajax-submit="//manage.kmail-lists.com/ajax/subscriptions/subscribe" method="GET" novalidate="novalidate">
  <input type="hidden" name="g" value="My_list">
  <input type="hidden" name="formId" value="">
  <input type="hidden" name="$fields" value="Phone">                      
  <input type="email" id="k_id_email" name="email" value="" class="name text_input">
  <input type="tel" id="k_id_phone" name="phone" value="" class="phone text_input">
  <button class="submit_btn">{% render 'icon-right-arrow' %}</button>
  <button type="submit" id="klaviy_form_submit_btn" class=" hidden"></button>
  <div class="klaviyo_messages hidden">
      <div class="error_message " style="display:none;"></div>
  </div>
  <div class="success_message hidden" >
    <p class="thank_you" ></p>
  </div>
</form>

 

Does anyone know how I can achieve this?

 

Regards,

Zain Ali.

Best answer by Brian Turcotte

Hi @zain_ali11!

Since this is a custom use case it is technically beyond the scope of Community/Support, but we have a wonderful network of Official Klaviyo partners who may be willing to help with extra development and custom features!
 

- Brian

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

4 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @zain_ali11!
 

May I ask if this is a custom site, or if you’re using one of our pre-built integrations with an e-commerce platform (like Shopify)?

- Brian


Forum|alt.badge.img
  • Author
  • Contributor I
  • 1 reply
  • May 14, 2024

The store is built on Shopify, however the quiz page is custom and built using Shopify’s templating language.’Liquid’.


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • June 13, 2024

Hi @zain_ali11!

Since this is a custom use case it is technically beyond the scope of Community/Support, but we have a wonderful network of Official Klaviyo partners who may be willing to help with extra development and custom features!
 

- Brian


Forum|alt.badge.img+4
  • Contributor I
  • 10 replies
  • June 27, 2024

Does this https://manage.kmail-lists.com endpoint still works after retiring api v1/v2?