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.