Marketo form in Salesforce Partner Community | Community
Skip to main content
February 15, 2017
Solved

Marketo form in Salesforce Partner Community

  • February 15, 2017
  • 3 replies
  • 6275 views

Hi,

I have a question hopefully someone can answer. We are trying to insert a Marketo form into a Salesforce Partner Community page. The Marketo form works just fine on a Marketo landing page. When we embed it into the salesforce page it doesn't show up. I am wondering if it is being blocked by this Salesforce security release... Release Notes

I would assume this is the case however hopefully someone might have a workaround or an idea on how to get this to work. We would like to have a form that will create leads in Marketo from this Salesforce page.

Any help is much appreciated!

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

The chance of getting access to all Forms 2.0 functionality with LockerService on, even when using a custom-compiled Marketo forms library, is basically nil.

As much as I champion Marketo forms, they're ultimately a square peg in this context. I would recommend using Lightning native components to build your form, then posting data to the forms endpoint (which is already in your trusted remote sites).

3 replies

Grégoire_Miche2
Level 10
February 15, 2017

Hi Andy,

A Marketo form is a Javascript in the first place. They originate from a Marketo server that you will have to declare as a trusted remote site in SFDC (setup -> security controls -> remote site settings).

Let's say your Marketo LP domain is info.mydomain.com. You will have to add info.mydomain.com as a trusted site in SFDC.

You als will have to pay attention to the fact that, by default, the forms2.0 api is called from a Marketo server in an embedded form:

<script src="//pod.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_9999"></form>

<script>MktoForms2.loadForm("//pod.marketo.com", "000-XXX-000", 9999);</script>

You may want to replace "pod.marketo.com" with your own LP subdomain in the scripts. Or you will have to declare pod.marketo.com as a trusted site in SFDC.

-Greg

February 16, 2017

Hi Greg,

Thank you for your reply. I have tried what you suggested and added our marketo custom domain as a remote site in Salesforce and we are still not able to see the form. I also double checked the form embed script and it is populated with our marketo custom domain. If we disable the "Lightening LockerService Security" feature in Salesforce the forms shows up fine. The problem is in a couple months that feature will be enabled by default in Salesforce. Do you have any other thoughts or anything else that I might be able to try? I truly appreciate your help!

Thanks,

- Andy

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
February 16, 2017

The chance of getting access to all Forms 2.0 functionality with LockerService on, even when using a custom-compiled Marketo forms library, is basically nil.

As much as I champion Marketo forms, they're ultimately a square peg in this context. I would recommend using Lightning native components to build your form, then posting data to the forms endpoint (which is already in your trusted remote sites).

Mark_Wright
Level 2
January 11, 2019

I am wondering if it would be possible to build a custom lightning component or something like that? Or a visualforce page?

SanfordWhiteman
Level 10
January 12, 2019

Possible? Yes. Has anyone proven it with fully working code?  Don't think so.

Mark_Wright
Level 2
February 3, 2019

Yeah I did it on a test community we have and it seemed to work ok, we havent put it on the live site yet though