Re: Add custom script tags to Marketo forms?

Anonymous
Not applicable

Add custom script tags to Marketo forms?

Hi, is there a way to add java script code to Marketo forms easily?

Example format:

<script type="text/javascript"></script>

4 REPLIES 4
Jim_Thao7
Level 9

Re: Add custom script tags to Marketo forms?

Is there a specific need?

You can add JS to any landing page to target form elements if needed.

Robb_Barrett
Marketo Employee

Re: Add custom script tags to Marketo forms?

.....a wild manual appears!

http://developers.marketo.com/documentation/websites/forms-2-0/

Robb Barrett
Pavel_Plachky
Level 5

Re: Add custom script tags to Marketo forms?

Hello Ryan,

as Jim noted, adding Javascript is possible. There are a few ways to do it.

1. Add HTML block to your landing page

2. Add the script to your landing page template

3. Use a token in your landing page template and set the token value in a program containing the landing page.

I hope it helps

Pavel

SanfordWhiteman
Level 10 - Community Moderator

Re: Add custom script tags to Marketo forms?

Ryan, pay very close attention to the manual Robb linked to.  You must use the Marketo Forms 2.0 event model to enhance Marketo forms.   While an experienced JS programmer will have no trouble waiting for events, attempting to skip proper event handling -- or to treat forms like raw HTML forms -- will fail, and you'll lose leads and/or make your forms unusable. There are commercial "data enrichment" form plugins that make these same mistakes with Marketo forms. Respect the framework, though, and you'll be fine!