Created
May 28, 2022 16:24
-
-
Save mcnaveen/add152bc94244b6ee5c9cb93fe0fc0e3 to your computer and use it in GitHub Desktop.
Autofill Form with Personalizery
This file contains hidden or 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
<script type="text/javascript"> | |
function personalizeryInit() { | |
let params = new URL(document.location).searchParams; | |
let name = params.get("firstname"); | |
let email = params.get("email"); | |
document.querySelector("#form-field-name").value = name; | |
document.querySelector("#form-field-email").value = email; | |
} | |
personalizeryInit(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment