Public preview
This feature is currently in public preview. If you're interested in using it, contact your Customer Success representative.
Set up age-gated pages or forms to meet legal or compliance requirements for regulated industries, such as betting and gaming, financial services, and other age-restricted products. By using logic rules based on a contact’s date of birth, you can control access so that only eligible users can view or interact with sensitive content.
Use case: Age-gated opt-in
In many regions, it’s illegal to promote age-restricted products such as betting and gaming, financial services, or other age-restricted services—to individuals under a certain age, typically 18 or 21. For example, a betting platform, insurance provider, or loan comparison site might need to ensure that only users aged 21 and over can sign up for marketing emails or access promotional content.
With Dotdigital’s logic tools, you can enforce these restrictions directly within your Surveys, pages, and forms. By combining action button logic and section logic, you can:
Prevent underage users from opting in to marketing.
Display a custom message explaining why access is restricted.
These features allow you to build a seamless, compliant user experience that automatically adapts based on the contact’s age, helping you stay on the right side of regulations while maintaining a professional and user-friendly interface.
Solution overview
To create an age-gated experience, use:
Section logic to control which sections are shown based on the contact’s date of birth.
Action button logic to hide navigation buttons, such as Next or Submit, if the contact is under the required age.
Before you start
Things you need to know:
You can use a template to create the age-gating page or form. Navigate to Content > Templates > Surveys, pages, and forms templates tab and select Age-gated sign up form. Start with Step 3 below.
If you've already created your form or page using Sections and buttons, skip to Step 3 to set up the logic.
Step-by-step guide to age-gating content
Follow these steps to build an age-gated form or page using Dotdigital’s logic tools.
Step 1: Create a new Page or Form
Navigate to Content > Surveys, Pages, and Forms.
Select NEW SURVEY, PAGE, OR FORM and choose either a Page or a Form, depending on your use case.
Choose a template or start from scratch.
Give your content a name and select CONTINUE.
Learn more in Use sections.
Step 2: Add a date of birth field
In the building blocks menu, go to Build > Form blocks and drag a Sections block onto the canvas.
Drag a Date and time block to Section 1.
Type your question in the block, for example, What is your date of birth?
This field allows you to calculate the contact’s age dynamically, which is essential for setting up the logic in the next step.
You can configure other details of this section later.
Step 3: Configure action button logic
Select the Edit section button on the right side of your Date and time block.
Enter a section title, and set Action button logic to YES.
Select HIDE ACTION BUTTONS WHEN.
By default, the action buttons are set to show.
In the Edit rule panel, set the following:
Action name - enter a name, for example, Hide when born within last 18 years.
When - choose All rules are met.
Select click to add rule and set the following in Edit rule panel:
Field - this is the field that you are creating a condition for. Select SELECT and choose the section you created in Step 2. Select CHANGE to configure a different field.
Clause - select Is within the last.
Condition - enter a number, for example, 18.
Condition - choose years from the dropdown to ensure the rule checks for age in full years.
Select APPLY in each open panel.
This rule hides the Submit or Next button if the contact is under the required age, effectively preventing them from proceeding or submitting the form.
Step 4: Add a rejection section
Drag a Text block onto the Sections and place it in Section 2.
Enter a message, for example, Sorry, you must be 18 or older to sign up. We’re committed to responsible marketing.
Select the Edit section button on the right-side of your Text block.
Enter a section title, and set Action button logic to YES.
In the Section logic settings, configure this section to be shown only when the contact is under the required age.
Ensure this section is hidden by default.
Select APPLY in each open panel.
Step 5: Add the rest of your content
Add any additional sections, fields, or content that should only be visible to eligible contacts.
Step 6: Publish and test
Select PUBLISH to make your page or form live.
Test with birthdates that are exactly on the age threshold, for example, exactly 21 years ago today to ensure your logic is accurate.
