Skip to main content

How to Use the Date Field in Lantern Quizzes

Written by Wendy

The Date Field lets you collect a valid date from quiz takers instead of asking them to type it into a regular text field.

It can be used for birthdays, appointments, delivery dates, events, or any other date you need to collect. Dates are saved in a consistent YYYY-MM-DD format, making them easier to use with integrations such as Klaviyo and Shopify customer metafields.

Add a Date Field to your quiz

  1. Open your quiz in the Quiz Builder.

  2. Click Add Page from the left-hand side menu.

  3. Select Open Ended Question.

  4. Choose Date Field.

  5. Enter your question and optional subheading.

  6. Add a Property ID for the question.

The Property ID determines how the answer is stored and sent to integrations. For example, if you use date_of_birth the selected date will be saved under that Property ID.

Note: A Property ID is required before the quiz can be published.

Image showing how to add a Date Field from the Open Ended Question page types and assign date_of_birth as its Property ID in the Lantern quiz builder.

Choose how customers enter the date

Open the Date Field settings from the right-hand side menu. You can choose from three input methods:

  • Dropdowns: Customers select the day, month, and year from dropdown menus. This is the default option.

  • Typed digits: Customers enter the day, month, and year into separate fields.

  • Browser date picker: Uses the date picker provided by the customer's browser or device.

The browser date picker may look different depending on the customer's device or operating system.

Image showing the three Date Field input styles in Lantern: Dropdowns, Typed digits, and Browser date picker, with a preview of each option.

Change the date format shown to customers

You can control how the date fields appear in the quiz using:

  • Field order: Choose Day / Month / Year, Month / Day / Year, or Year / Month / Day.

  • Month shown as: Display the month as a name or number.

  • Show labels: Show or hide the Day, Month, and Year labels above the fields.

Image showing the Date Field display settings in Lantern with Month / Day / Year order, month names, and field labels enabled, alongside the updated quiz preview.

These settings only change how the date appears to the customer.

Regardless of the display format, Lantern always saves the date as:

YYYY-MM-DD

For example:

1990-06-03

Set age and date restrictions

The Date Field includes additional settings for controlling which dates customers can select.

Minimum age

Use Minimum age if customers must be a certain age before they can continue.

Lantern checks the complete date of birth, including whether the customer's birthday has already occurred during the current year.

You can also customize the message displayed when someone does not meet the minimum age requirement.

Image showing the Minimum age setting for a Lantern Date Field and the validation message displayed when a shopper is too young to continue.

Allow dates in the future

Allow dates in the future is disabled by default, but it can be enabled.

Oldest age offered

Use Oldest age offered to control how far back customers can select a year. The default is 120 years.

Send the date to your integrations

The selected date is saved using the Property ID assigned to the question.

For example, a Date Field with the Property ID date_of_birth will save:

{   "date_of_birth":"1990-06-03" }

Lantern uses the same YYYY-MM-DD format regardless of how the date was displayed in the quiz.

Send additional date information

Under Integration Settings, you can optionally save additional values alongside the original date.

Image showing the Date Field Integration Settings in Lantern with the optional checkboxes to also send the shopper’s age, day and month only, and Klaviyo age gate value.

If the Property ID is date_of_birth, the available values are:

Setting

Value saved

Also send their age

date_of_birth_age

Also send the day and month only

date_of_birth_month_day

Send to Klaviyo's age gate

age_gated_date_of_birth

For example, enabling all three could save:

{
"date_of_birth":"1990-06-03",
"date_of_birth_age":"36",
"date_of_birth_month_day":"06-03",
"age_gated_date_of_birth":"1990-06-03"
}

Using age with quiz conditions

Sending the customer's age can also be useful when building personalized quiz paths.

Date values themselves are stored as text for quiz conditions, so Lantern cannot calculate whether one date is earlier or later than another inside a Skip/Show condition.

The additional age value gives you a simple number that can be used when setting conditions for different age groups.

Save the date to a Shopify customer metafield

If your quiz creates Shopify customers, the collected date can also be saved to a customer metafield.

Note: To save the date to a Shopify customer metafield, make sure Create Customer in Shopify is enabled in the Results Page settings.

In the Results Page settings:

  1. Add or select the customer metafield.

  2. Set its metafield type to date.

  3. Use the Date Field Property ID as the value.

For example:

{{ date_of_birth }}

Replace date_of_birth with the Property ID used in your quiz.

Image showing the Customer Metafields settings on the Results Page in Lantern, with the metafield type set to date, the metafield name set to date_of_birth, and the metafield value set to {{ date_of_birth }}.

Styling the Date Field

The Date Field follows the styling of your current quiz theme, including fonts, colors, and button styles.

Good to know

  • Invalid dates cannot be selected.

  • The available days automatically adjust based on the selected month and year, including leap years.

  • Date Field questions cannot be connected directly to products, similar to other Open Ended Question types.

  • You can still use the page with content blocks and Skip/Show conditions.

  • The Date Field is not limited to birthdays. Enable Allow dates in the future to use it for appointments, events, or delivery dates.

Did this answer your question?