That said, the issue is definitely with how you're grabbing the cookies. When I plug readCookie('STYXKEY-huddleTracker') into the console, I get undefined. I'd go ahead and use the code I wrote above, which works, instead of the readCookie function as it doesn't appear to be behaving as expected.
That said, the issue is definitely with how you're grabbing the cookies. When I plug readCookie('STYXKEY-huddleTracker') into the console, I get undefined. I'd go ahead and use the code I wrote above, which works, instead of the readCookie function as it doesn't appear to be behaving as expected.
Hi @ianong , I'm no longer a HubSpot employee but i'd still be happy to help out. The JS snippet I provided should certainly work for any form that you're embedding onto a page. If you're embedding the form, you must use the callbacks like onFormReady or onFormSubmit since forms are dynamically loaded to a page with JavaScript and simply placing the JS on your page won't guarantee the form is loaded on the page yet. You should also make sure that the "name" attribute in your JS like my example:
exactly matches the internal value of your hidden form field.
Finally, you should also be sure to toggle the "unstyled form" button for your form as styled forms are loaded in via an iFrame and the callbacks cannot be utilized:
If this all checks out, I'd be happy to help if you send over a page with your form on it so I can take a look at your code. If I can't troubleshoot further, I'm sure @IsaacTakushi , @Derek_Gervais or @lscanlan can help you out here (sup guys?).