Forms don't have a <body> tag. A body tag defines the document's body. A form is one component within a document (webpage). Forms have other HTML elements. What specifically are you trying to do?
A
Anonymous
April 2, 2015
I'm trying to add a linkedin in auto-fill form code. so marketo has a linekdin option, but it takes about 2-3 steps to complete. I am trying to eliminate that step and add custom scripting code to be placed in the <body>
@Regie K Please post a link to the LI code you're referring to.
Like @Justin C says HTML forms (Marketo forms are HTML <FORM> tags under the hood) never have <BODY> tags. However the Forms 2.0 API is very flexible and almost certainly will let you execute your code in the form's initial callback (the 4th parameter to MktoForms2.loadForm()).
A
Anonymous
April 2, 2015
AH awesome. And thanks for the reply.
The following is my code, just need to know where to put it in:
I can tell you that this code duplicates what you provided using the Forms 2.0 API (injects the LinkedIn script dynamically after the Marketo form is loaded and refers to the Marketo fields). Past that, I can't tell you much: documentation on the LI autofill feature is really scant. You'd probably want to talk to the LI community next.
A
Anonymous
April 2, 2015
But where in the marketo form code would I put this in? I can't imagine putting it within the css styles or anything
I don't mind testing it out myself
A
Anonymous
April 2, 2015
is it possible to add code to the form via the "embed code" feature? on the form's main page
You would get the data you need from the LinkedIn API (like Sanford I don't know much about this, you should look into their documentation) and then update the form via JavaScript. Are you familiar with how to do this?
var textbox = document.getElementById("myTextBox"); textbox.value = "Something";
Instead of "something" you would fill that field with the value you retrieved from LinkedIn.
@Regie what I posted is a customized version of the Marketo embed code.
@Justin I think the LinkedIn code is supposed to fill the fields automatically (?) based on the mapping element (LI field = Mkto field) when it loads. But this is a really terribly documented feature for a major platform. I hope it's still in beta....
A
Anonymous
March 23, 2016
Hey Regie,
I am having the exact same issue with where to put that code! Did you ever seem to figure it out?
LinkedIn is discontinuing Lead Accelerator, so this won't be useful anymore.
A
Anonymous
April 8, 2016
Even though they are discontinuing LLA, it would still be useful for anyone who has a LinkedIn profile. We have paid media ads on LinkedIn, so I would love to figure out where to put that code.