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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans