How to referencing custom properties from a signup form in an email?

  • 1 June 2021
  • 1 reply

Badge +2

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="//" 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 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 class="klaviyo_fine_print"></div>
        <div class="klaviyo_form_actions">
            <button type="submit" class="klaviyo_submit_button">
        <div class="klaviyo_below_submit" ></div>
        <div class="error_message" ></div>
        <div class="success_message" ></div>
<script type="text/javascript" src="//"></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>

  var settings = {
  "async": true,
  "crossDomain": true,
  "url": "",
  "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) {
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


Best answer by David To 1 June 2021, 19:33

View original

1 reply

Userlevel 7
Badge +60

Hello @anjali3rde,

You should be able to include this hidden field value you are passing within your email templates by utilizing the {{ person|lookup:'CUSTOM_PROFILE_PROPERTY' }} syntax. I elaborated further on this topic in another Community post you commented on earlier below:

Hope this helps!