Fill form field with external URL string


I'm a lamen, I'll start there.

We have recently launched a channel program and are working with a third party software to track referral submissions. I've created a landing page with a form for our partners to log into their portal and self submit leads. It is hosted on HubSpot and is a HubSpot form but it is iframed into their portal which is through a third party. I need the hidden field to be populated with the referral short code of the partner's portal that is logged in. I am told by the company that the page is iframed into that the field needs to pull this value from the URL.

I've looked into this and haven't found a topic too similar, if it's here, my apologies.

Any ideas?


I solved this problem pretty easily, which was alluded too several times in different posts, by just creating a new field on the form and naming it the same as the value I was looking to capture -- no coding required.