Hi there,
I’m trying to pass values from cookies into typeform. I have all the steps working apart from the final one: passing values from a variable into the hidden field within typeform.
I’m using this very simple code for this:
<div data-tf-widget="FY0i2jhu" data-tf-opacity="100" data-tf-inline-on-mobile data-tf-iframe-props="title=Testing HS" data-tf-hidden="hubspot_utk=,hubspot_page_name=,hubspot_page_url=" data-tf-hubspot style="width:100%;height:500px;" id="form"></div>
<!-- https://github.com/js-cookie/js-cookie -->
<!--<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>-->
<script src="//embed.typeform.com/next/embed.js"></script>
<link rel="stylesheet" href="//embed.typeform.com/next/css/widget.css" />
<script>
var source_var = "testing2"
window.tf.createWidget('FY0i2jhu', {
container: document.querySelector('#form'),
hidden: {utm_source: source_var}
})
</script>
I have utm source:

But I cannot add hidden fields themselves:

My form is on this page: https://typeform-test-897513.webflow.io/testing-typeform-hs
I’ve also tried adding it here but it doesn’t work: data-tf-hidden="hubspot_utk=,hubspot_page_name=,hubspot_page_url=,utm_source="
How can I pass utm_source value from a cookie?
Thanks