Partner Referral Form and pURL
We'd like to create a Marketo landing page with a form that will allow authorized partners to submit referrals. We're going to use a pURL for this, so that only authorized partners will have the form displayed to them. We'd like to capture the partner's SFDC Account ID into a hidden form field, so the partner doesn't have to enter it.
One way to do this is to add the Account ID as a query parameter in the link we provide the partner and the form would capture the URL Parameter into a hidden form field However, if the partner navigates to the page without the link, that query parameter will no longer be available. We could potentially store the query parameter in a cookie, but it could become deleted, they could initially navigate to the pURL without the query parameter, etc.
Since the partner will be using a pURL, and the LP can have snippets / tokens containing information from that lead's record, I'm guessing it's possible to set the Account ID in a Data Transfer Object and write that value into a hidden form field. I looked at a few discussions and developers.marketo.com docs for Forms 2.0 and came up with the following HTML to include on the LP, but not surprisingly, it doesn't work (munchkin ID is replaced with x)'s. I'm sure that I'm not setting or reading the AccountID variable correctly and would appreciate any recommendations.
<div ID="AccountID" style="display:none">{{lead.Account ID (18)}}</div>
<script>
MktoForms2.loadForm("//app-sj08.marketo.com", "xxx-xxx-xxx", 1769, function(form) {
// Set the value of the Referring Partner field
form.vals({"Referring Partner":"AccountID"});
});
</script>