How To
How to include current URL in a Webflow form?

If you have a blog on Webflow that includes a lead gen form or a newsletter form in all blog posts, when you receive an email from one of the forms – of course, you have to find out the URL of the respective page. This way, you can detect the top converting posts.
Automatically include the current URL in the webflow form
- Add an embed code before the submit button – make it hidden, and before saving, insert the following code into it
- The code:
<script type=”text/javascript”> window.onload=function() {document.getElementById(‘pageurl’).value = window.location.href;} </script> <input type=”hidden” id=”pageurl” name=”pageurl” value=”pageurl” />
Follow us for more Webflow hacks.