How to use Hidden Fields to Include your Current URL, Referring Page URL, and form names using one line of JavaScript

Hey there!
Unfortunately I can’t seem to get this working. The form comes in like this:

formSrc1: modal
formUrl1: /
formRef1:

I’ve tried embedding the javascript sitewide, as well as on the specific page, but it just won’t work. I’m not sure why. :frowning: