Hello Klaviyo
This is the form I have added in my vendor page
<div class="klaviyo_modal" id="subscrib_form" style="display:none;">
<div class="klaviyo_inner">
<a href="#" class="klaviyo_close_modal klaviyo_header_close">×</a>
<form action="//manage.kmail-lists.com/subscriptions/subscribe" method="POST" novalidate="novalidate" class="klaviyo_subscription_form">
<input type="hidden" name="g" value="WUVNZS">
<input type="hidden" name="$fields" value="VendorName"/>
<div class="klaviyo_fieldset">
<p class="klaviyo_header">Subscribe to us </p>
<p class="klaviyo_subheader">Stay in the know with news and promotions.</p>
</div>
<div class="klaviyo_fieldset">
<div class="klaviyo_field_group">
<label for="k_id_modal_$email">Email Address</label>
<input type="email" id="k_id_modal_$email" name="email">
<input type="hidden" name="vendor_name" value="{{collection.title}}" />
</div>
</div>
<div class="klaviyo_fine_print"></div>
<div class="klaviyo_form_actions">
<button type="submit" class="klaviyo_submit_button">
<span>Subscribe</span>
</button>
</div>
<div class="klaviyo_below_submit" ></div>
</form>
<div class="error_message" ></div>
<div class="success_message" ></div>
</div>
</div>
<script type="text/javascript" src="//www.klaviyo.com/media/js/public/klaviyo_subscribe.js"></script>
<button onclick="KlaviyoSubscribe.attachToModalForm('#subscrib_form',{delay_seconds: 0.01, hide_form_on_success: true, ignore_cookie: true, success_message: false});">Click me</button>
<script>
var settings = {
"async": true,
"crossDomain": true,
"url": "https://manage.kmail-lists.com/ajax/subscriptions/subscribe",
"method": "POST",
"headers": {
"content-type": "application/x-www-form-urlencoded",
"cache-control": "no-cache"
},
"data": {
"g": "{{WUVNZS}}",
"$fields": "$vendor_name,$first_name",
"email": "{{email}}",
"$vendor_name": "{{vendor_name}}",
"$source": " Subscription form"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
</script>
I have created hidden field with name vendor_name and passing collection title value in it
I waant when someone subsbribe and when user receiving email i need to send this hidden field vendor name in subsbription email but i dont know how to pass this hidden field value in email subsbription template
please help me for this its urgernt