Adding Page URL & Title to a Webflow Form

Webflow Developer
Jasper Hallamore
November 4, 2022
2 Min

In this Webflow tutorial, I'll be showing you how to add a page URL and title into a Webflow form submission. This is an extremely easy feature to add to your Webflow forms. It's a great way to help keep track of the pages your Webflow form submissions are coming from.

Page Code:

<script>window.addEventListener("DOMContentLoaded", (event) => {  document.getElementById("url").value = window.location;  document.getElementById("page-title").value = document.title;});</script>

Form Code:

<input type="hidden" class="text-field w-input" maxlength="256" name="url" data-name="URL" id="url">
<input type="hidden" class="text-field w-input" maxlength="256" name="page-title" data-name="page-title" id="page-title">

Share this Webflow tutorial
© 2022 Jasper.studio . All right reserved.