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,...
Answered

Where to put javascript on a marketing form?

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to create a Marketing Form that will be embedded on an external page (not on an Marketing Page created in Dynamics). I have a javascript function that should execute on afterFormLoad (because it uses some fields from the form). I understand that is not recommended to embed the javascript inside the HTML code of the Marketing Form because additional content will always be cleared. Refer this post: https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/417003/extending-marketing-forms-with-javascript/1141818#1141818. 

Is putting the script on the page itself the only viable option? There isn't another way to embed the javascript in the code of the Marketing Form without to worry that it will be cleared everytime the form will be updated?

Thank you.

  • Verified answer
    Nya Profile Picture
    29,064 on at

    Hi,

    Please refer to the following documentation to know more about how to extended marketing form using JavaScript.

    Extend marketing forms using code (Dynamics 365 Marketing Developer Guide) | Microsoft Docs

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 95 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 75

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 58 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans