-
Philipp_philippAsked on October 30, 2020 at 6:46 AM
Hello guys,
im trying to figure out how to use JavaScript to prefill fields.
Situation: User gets to a landing page (comx.io/quiz) .
Complication: On the JotForm page, the UTM parameters will be gone because its a different page. So i want to save the UTM parameters in a cookie and push them into the form through javascript.
I use Google Tag manager to achieve this but the fields won't fill. How can i solve this problem? Do i have to change the way the form is implemented into the page?
-
Lorenz JotForm SupportReplied on October 30, 2020 at 7:31 AM
Hi there,
You can prepopulate fields to your form via URL parameters.
Here's a guide: https://www.jotform.com/help/71-prepopulating-fields-to-your-jotform-via-url-parameters
I'm quite not sure, how it can be done in Javascript, but I think you will have to download the source code of your form and add your own custom code in order to achieve that.
Guide: https://www.jotform.com/help/104-how-to-get-the-full-source-code-of-your-form
I hope this helps. Let us know if you need any further assistance.