Skip to main content

How to Make a Modal Form Appear on Page Load

Configure Formulayt forms to appear automatically when a page loads. Display modal forms without requiring user clicks.

Updated over 10 months ago

This guide shows you how to configure a Formulayt modal form to appear automatically when a page loads, without requiring user interaction.

Overview

Normally, modal forms appear when a user clicks a button or link. This article explains a simple method to make forms appear immediately when the page loads.

Note: If you want to restrict access to an entire page, consider using a page lock gate instead, which is available on most accounts.

Prerequisites

Before you begin, ensure you have:

  • A Formulayt gate already created

  • The gate embedded on your target page (can be embedded as a modal or inline gate)

Find your modal gate code

First, locate the modal embed code for your gate. This code typically starts with #gate- followed by a unique identifier. The Formulayt Chrome Extension makes this easy.

Append the code to your URL

To make the modal form appear on page load:

  1. Take the complete URL of the page where your gate is embedded

  2. Add the modal gate code to the end of the URL

Format the URL Correctly

When modifying the URL, follow these important formatting rules:

  • Make sure the gate code appears after any query string parameters (indicated by ?)

  • Remove any existing bookmarks or hash tags that may already be in the URL

  • The gate code should start with # and include the full gate identifier

Example:

https://example.com/your-page?parameter=value#gate-98ea71d5-b820-49dc-acdb-167575509999

Using auto-loading modal forms

You can now distribute this modified URL through:

  • Website navigation

  • Email marketing campaigns

  • Social media posts

  • Digital advertisements

  • Internal links

The modal form will appear immediately when users access the page through this URL.

Did this answer your question?