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

Form submission in Marketing Form in JavaScirpt

(0) ShareShare
ReportReport
Posted on by 30

Hello, 

is it possible to change Marketing Form Attributes in JavaScript and automatically submit the form. 

I added a script inside the parent Marketing Page and I can interact with the event-object.

Right now I'm not able to submit the form.

(function() {
MsCrmMkt.MsCrmFormLoader.afterformrender = function() {

//code here

event...

};
})();

Is there a supported way to submit the form data directly in this method? I just found this documentation:

https://docs.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility

Thank you

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi Patrick,

    Could you let me know what customization would you like to add to marketing form? Such as populating form fields with data after the form is rendered.

    Why couldn't you submit the form? Please open console and check whether there is any error.

    If using embedded marketing form, it is not supported to submit data with code directly.  

    You could switch to form capture and send submission manually with sendFormCaptureToCrm function.

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility#form-capturing-behavior-customization

    Regards,

    Clofly

  • Verified answer
    Defne Ayanoglu Profile Picture
    on at

    Hi Patrick, 

    Were you able to fix the issue? 

    You could also use the afterFormLoad event. You can attach the submission code to the afterFormLoad event and trigger a submission event for the form. 
    It's in the same documentation on extensibility.

    Hope this helps.

    Regards, 
    Defne
  • Nishant Rana Profile Picture
    11,325 Microsoft Employee on at

    Hi Defne,

    Hope you are doing well.

    Which method are you referring in the document for form submission ? We could see one for formcapture, is there a similar method for embedded form

    learn.microsoft.com/.../marketing-form-client-side-extensibility

    Something like this - developers.marketo.com/.../

    Regards,

    Nishant Rana

  • Suggested answer
    Nishant Rana Profile Picture
    11,325 Microsoft Employee on at

    One option is to call the click event of the submit button - nishantrana.me/.../

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 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans