The same form multiple times on a page but with different IDs within the forms | Community
Skip to main content
New Participant
July 13, 2022
Solved

The same form multiple times on a page but with different IDs within the forms

  • July 13, 2022
  • 1 reply
  • 2967 views

I am currently using the MktoForms2 API to use a single form multiple time on a page. I am able to embed a form multiple times with the following:
<form class="mktoForm" data-formid="1218"></form>

But since the same form is being used multiple times, the IDs inside the forms end up being the same so the page has multiple of the same ids. For example, the page now has multiple of this tag: <label  id="LblFirstName" class="mktoLabel mktoHasWidth movetop" style="width: 100px;"></label> so the id "LblFirstName" shows up multiple times.

Is there a way for the forms to have unique IDs for all the elements within the form?

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

See the post Multiple Marketo forms, multiple times… on the same page.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
July 13, 2022