Help to auto populate one field in form held in a iframe

Hi everyone, I’m looking for your expertise to help me if it’s at all possible.

I have a site that currently holds a form in a iframe.

The form in the Iframe is held on another server and can be found at:
https://www.eziapps.co.uk/eziappsplus/quotations?appId=143

I’d like to pre populate source code field of the form via a link given to affiliates.

So if I give affiliates a code of 1234 they could then click on the link
http://www.mysite.com/index2.php?source_code=A1234

and it would auto populate the field in the form in the iframe. So when it’s submitted we can track the affiliate link in the source code field.

I’ve been given this php code by the author of the form to paste into the page holding the iframe

[php]<?php
var $source_code = $_GET[‘source_code’];
echo ‘

’; ?>[/php]

Not being a specialist in php I can’t see why this isn’t working.

If anyone could help with this then I’d be most appreciative.

Thanks in advance and apologies if i haven’t made myself clear

You can’t. Your code is on one server, the form is on another. The servers are not going to communicate code from your server to theirs. Why can you not just put the form on your site so you can control it?

Hi, I thought that would be the issue.

The form is in a iframe as it’s for an insurance brokerage and all the backend of the database etc is handled by a third party. The site the iframe sits in is for a front facing sales company. They don’t own the data etc so need the system to work this way.

Is there a work around that you know of, or another solution completely?

Thanks for your advice

Sponsor our Newsletter | Privacy Policy | Terms of Service