How to Collect Date Properties from Your Subscribers Using a Legacy Form

Last updated at:


Because legacy forms use custom HTML and CSS, our support team is unable to assist with troubleshooting legacy forms. Learn more about collecting date values using Klaviyo's new Signup Form Builder instead.

Klaviyo can accept custom date fields submitted through a signup form. These will take day, month, and year input values and combine them inside Klaviyo as one date property. In our example, we will walk through adding a birthday field to a signup form. This requires the following:

  1. Adding Birthday as a value in your form's $fields hidden input.
  2. Adding a block of code to your form for the date input selectors.

This guide walks through these two steps and then covers using the Birthday field in Klaviyo.

Add Birthday as a $fields Value

The first step is to add the "Birthday" value to the $fields input of your form. If you already have a value here, you can add birthday as well, and separate the two with a comma. If this input doesn't exist, you can add it right after the hidden input with your list ID.

<input type="hidden" name="$fields" value="Birthday">

Add Birthday Selector Fields to Your Form

Next, add the code below inside your form to add the birthday selectors. Note that the value for birthday_month options must be integers, but the label for those values can be text.

<div class="klaviyo_field_group select-date-widget">
 <label for="klaviyo_birthday_controls">Birthday</label>
 <div class="klaviyo_birthday_controls">
    <select name="Birthday_month" >
      <option value="1">January</option>
      <option value="2">February</option>
      <option value="3">March</option>
      <option value="4">April</option>
      <option value="5">May</option>
      <option value="6">June</option>
      <option value="7">July</option>
      <option value="8">August</option>
      <option value="9">September</option>
      <option value="10">October</option>
      <option value="11">November</option>
      <option value="12">December</option>
   <select name="Birthday_day" >
     <option value=""> </option>
     <option value="1">1</option>
     <option value="2">2</option>
     <option value="3">3</option>
     <option value="4">4</option>
     <option value="5">5</option>
     <option value="6">6</option>
     <option value="7">7</option>
     <option value="8">8</option>
     <option value="9">9</option>
     <option value="10">10</option>
     <option value="11">11</option>
     <option value="12">12</option>
     <option value="13">13</option>
     <option value="14">14</option>
     <option value="15">15</option>
     <option value="16">16</option>
     <option value="17">17</option>
     <option value="18">18</option>
     <option value="19">19</option>
     <option value="20">20</option>
     <option value="21">21</option>
     <option value="22">22</option>
     <option value="23">23</option>
     <option value="24">24</option>
     <option value="25">25</option>
     <option value="26">26</option>
     <option value="27">27</option>
     <option value="28">28</option>
     <option value="29">29</option>
     <option value="30">30</option>
     <option value="31">31</option>
 <input type="hidden" name="Birthday_year" value="2021" />

This code will collect a month and day on your form, but automatically assigns the year 2021 to the date. This is because when sending birthday emails, you will likely only need to leverage the month and day. 

If you would like to collect a birthday year as well, you can change the birthday_year input to a select element with the years you want to use as options. Adding a year selector is not important for Klaviyo because when you create a segment for someone's current birthday, Klaviyo will only look at the month and day. However, if you would like to collect a subscribers birthday year as well you can do so by updating the above code so that a subscriber can select a year, you can replace the hidden Birthday_year line of code with this:

<select name="Birthday_year" >  
   <option value=""></option>  
   <option value="2021">2021</option> 

This will give the options of no value or 2021. To add more year options, it will look like this:

<select name="Birthday_year" >  
​   <option value=""></option>  
   <option value="1990">1990</option>
   <option value="1991">1991</option>
   <option value="1992">1992</option>
   <option value="1993">1993</option>
   <option value="XXXX">XXXX</option>

Alternative: Collect Birthdays Using a Subscribe/Manage Preferences Page

A less technical option is to add a date field to your subscribe page for a given list. This, in turn, will also be reflected on the list's manage preferences page.

Please note that if you use this method, subscribers must input their birthdays in the MM/DD/YYYY format in order for Klaviyo to recognize the value as a date. For this reason, it's important that you include help text to make sure subscribers are informed.


If you want to follow up with subscribers after they first sign up to ask for their birthday information, you can insert a manage preferences tag into your welcome series email. In order to do this, you will need to update the subscribe page that is attached to the same list as your signup form.

Using a Date Field in Klaviyo

If your form is properly configured to collect date information, when it is submitted, these two dates will be combined into one field. This field will be added to Klaviyo as a custom property and added to each subscriber's Klaviyo profile. 

Was this article helpful?
87 out of 191 found this helpful