Last active
March 19, 2024 22:53
-
-
Save sadiqmmm/6b03bb5be9d6bb2422d72a5616639c16 to your computer and use it in GitHub Desktop.
Get your form’s URL when it’s embedded in another page - With Paperform, you have the capability to automatically retrieve the URL of your form's page, enabling you to discern the origins of your submissions when they're integrated into other web pages. Gain fresh insights into where your customers are completing your forms!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-paperform-id="jwps"></div> | |
// Note: Please don't change/format the below line no 3. Keep as it is. | |
<script>(function () { var script = document.createElement('script'); script.src = "https://paperform.co/__embed.min.js"; document.body.appendChild(script); })()</script> | |
<script> | |
(function () { | |
const currentPageUrl = window.location.href; | |
const form = document.querySelector("[data-paperform-id='jwps']"); | |
// formsubmiturl is your custom Pre-fill key: | |
form.setAttribute('prefill', "formsubmiturl=" + currentPageUrl); | |
} | |
)() | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reference:
For consulting: