Embedding form on website without form tag | Community
Skip to main content
Hayley_Iacocca
Level 2
May 1, 2019
Question

Embedding form on website without form tag

  • May 1, 2019
  • 2 replies
  • 5731 views

We want to embed a Marketo form on a page of our website. When we provided the form embed code, our developers shared that our website already has the asp form tag on the page. Since the Marketo embed code also has a form tag in it, it won't work on our webpage. Does any know of any other options, that doesn't include a form tag, for embedding a Marketo form (e.g. javascript)?


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

2 replies

SanfordWhiteman
Level 10
May 1, 2019

The embed code only includes the <form> tag for convenience. As long as your <form> has the id="mktoForm_nnn" it will work just as well, just remove the <form> from the embed code.

Hayley_Iacocca
Level 2
May 1, 2019

Thanks for this recommendation, Sanford. I just checked with our developer but she said it won't work. She said the solution still depends on having the form tag on the page and we can't add the id="mktoForm_nnn" to our existing form tag.

SanfordWhiteman
Level 10
May 1, 2019

You have to add the id to the form, at least temporarily. Marketo forms do not directly take an HTMLFormElement as an argument.

I don't understand a situation in which you must use an existing form element but cannot add any attributes.

Level 2
May 2, 2019

We had a similar problem at our place. We chose send the values, that would eventually go to Marketo, into our existing form. In this case it went into our CRM system. Then with a middleware solution (Vertify), we sent those values from the CRM into Marketo. This has been very reliable for us. We found the embedded/hidden Marketo form submission to be unreliable - which I think was due to issues with Javascript from our CRM front end.

SanfordWhiteman
Level 10
May 2, 2019

We found the embedded/hidden Marketo form submission to be unreliable

Well, a hidden form post using the Forms JS API is a lot more reliable than any back-end integration, which has an inherent DoS vulnerability.

Level 2
May 2, 2019

I like how you quoted half of my sentence. I explained it was due to other javascript on the page. So for our case it is less reliable. To be specific, it was 3rd party JS that we can't modify, which got an error preventing the javascript engine from submitting the Marketo form.

Sandford, if you're not too busy taking people's comments out of context, maybe you have a suggestion for getting around 3rd party code that prevents the javascript engine from executing.

About your point of the inherent DoS vulnerability... the back-end integration is behind our firewall and the APIs are only accessible with network credentials over a VPN. I don't see DoS attacks happening much that way. With 2 forms on a public html page though, that seems like 2x the DoS vulnerability. In my case I have just 1 form submitting, which has to be submitted anyhow.