Pass LeadSource through URL to Infusionsoft Custom webform in LeadPages

Hi guys,

We’ve been trying to pass LeadSource through a url that was built on Leadpages.

I’ve built the webform on Infusionsoft and have also added a hidden field with the LeadSource and have kept the value empty. We’ve tried testing the url but it doesn’t populate the right leadsource.

After the url we’re adding ?LeadSourceId=6261 where 6261 is a test Leadsource. We spoke to Infusionsoft support and they mentioned that this can be done via custom code.

Can anyone help us with the code that will enable us to pass the LeadSource using customer url?

Thanks in advance