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 Insights - Journeys forum

Javascript in Marketing forms

(0) ShareShare
ReportReport
Posted on by

Hi 

Our marketing form is hosted at a landing page in the customers own CMS system.

We need to add some javascript code to the form to validate some field content.

When we open the landing page with our marketing form the script code is lost. It seems it is extracted from the form.

Is there any way to overcome this issue?

Thanks 

Torsten

I have the same question (0)
  • Verified answer
    ShravanSuri Profile Picture
    1,255 on at

    Hey Torsten,

    We're bringing this functionality in an upcoming update, but right now, you can add the JS code on the landing page itself to perform this validation. Essentially, you hook up on afterformload, at this point our submit handler is attached; hijack it (store it somewhere), replace it with handler that will prevent default, run the validation you'd want to run and if validation is successful, run the original submit handler.

    Please reach out to me (Shravan.suri@microsoft.com) if you require further assistance with this.

    Regards,

    Shravan

  • TGT Profile Picture
    135 on at

    I am also curious when this will be released.

    We also have a few 3rd party CRM providers and it would be preferred to update the javascript code on the form our self instead of waiting for CMS provider to do it for us...

  • Suggested answer
    PoojaBhardwaj Profile Picture
    9 on at

    You can follow the below link, this might be helpful for you.

    medium.com/.../add-validations-using-javascript-to-marketing-form-in-dynamics-365-d769816f58b8

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Insights - Journeys

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans