web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Form capturing multiple forms in a Single Page Application

(0) ShareShare
ReportReport
Posted on by 5

Hello, 

I'm trying to capture two different forms (which are both in different url paths) in our Single Page Application. 

When I go to one of these paths, the script provided gets loaded and everything works properly.

The problem that I'm facing is when I navigate from the path of one form to the other one. It gives us the following error, since the script is already there: 
MsCrmFormLoader is already defined, make sure Dynamics 365 Marketing loader.js script is not included twice in the page.

Could someone guide me on what would be the best approach to solve it? 

I have the same question (0)
  • Dsouza_28 Profile Picture
    7 on at

    Hi , 

    If I understood correctly , both the forms reside in the same web domain. So you just need one Web tracking script and one form tracking script. 

    Where have you pasted the form JS script? In the CMS webpage or Google tag manager? 

  • gfscp Profile Picture
    5 on at

    Hi Roy, thanks for the answer.

    Yes, both forms are in the same domain. We are currently using only one form tracking script for the form capturing, but I don't think we are using the web tracking one. Should we be using it?

    On the other side, we have embedded the script directly in the code on a component that gets rendered on these two pages.

  • Suggested answer
    Dsouza_28 Profile Picture
    7 on at

    Hi ,

    The issue can stem from different direction here based on redendering/Load function call. 

    Please check the following solutions:

    1. Is the javascript function registered twice on the onload event? if yes, delete the duplication

    2. Does the javascript function calls another function that loads the web resource? ex: body=onload is called twice ? Self-execution happening twice anywhere?

    3. If none of the above then see if there is a: delete MsCrmMkt.MsCrmFormLoader and try again. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 120 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans