Skip to main content
November 4, 2016
Solved

Multiple copies of same form on a page problems...

  • November 4, 2016
  • 12 replies
  • 11532 views

Hi,

using embedded 2.0 forms I've run into a problem with having multiple copies of the same form on the same page - I'd guess because they all have the same form ID.

My coworker - who runs our email marketing process - is looking to simplify how many forms he has to maintain and I'm investigating ways to help him do that We want to have a form with the same set of fields appear multiple times on our product pages, in a popup, in a sidebar, inline in the content etc...

What I'm seeing is:

  • the first form loads correctly
  • when the second instance loads it inserts a duplicate set of form fields into the first instance.
  • every further instance adds another copy of the fields to all other instances which have the the same ID  - eg  "mktoForm_1234".

Is there an easy way to work around this? Or should I just make multiple copies of the same form in the backend of Marketo, and he will have to update them all separately when a change is needed?

I'm aware I could be using the API to send and receive info - and bypass the whole problem - but I'd like to keep things simple for now.

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

Simple enough. As demoed in earlier Community posts: MktoForms2 :: Same Form Multiple Times

Set the <FORM> tags as shown, adding the form ID to the data-formId attribute instead of the literal id attribute. The code will manage the attributes for you.

12 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
November 5, 2016

Simple enough. As demoed in earlier Community posts: MktoForms2 :: Same Form Multiple Times

Set the <FORM> tags as shown, adding the form ID to the data-formId attribute instead of the literal id attribute. The code will manage the attributes for you.

November 7, 2016

Thanks - I'll give it a try.