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

I tried this and I can see the form fields with the correct values, but it’s not being sent to Mailchimp with the API calls. Any ideas?