Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Make a Marketing Form Submission in the Background using JavaScript

Posted on by 55 Microsoft Employee

Hi Experts,

Do we have a similar method for Dynamics 365 Marketing - https://developers.marketo.com/blog/make-a-marketo-form-submission-in-the-background/ 

We could see one for Form capture but not for embedded form ?

https://learn.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility#mscrmmktmscrmformloader-methods 

Thanks,
Nishant Rana

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Make a Marketing Form Submission in the Background using JavaScript

    We called the click event of the submit button to do so  - nishantrana.me/.../

  • Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Make a Marketing Form Submission in the Background using JavaScript

    Thanks for replying Petr. Actually we want to use Prefill feature as well, so next time when the user visits, we want to show hide content on that page, which I think doesn't work with Form Capture.

  • Verified answer
    Petr Jantac Profile Picture
    Petr Jantac on at
    RE: Make a Marketing Form Submission in the Background using JavaScript

    Hi,

    I think it would be easier to use the Form capture feature.

    This feature captures the submission from forms which were not created in Marketing. It will automatically generate the JavaScript code you need, so you just put it into your page.

    Please let me know if this worked for you.

    Petr

  • Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Make a Marketing Form Submission in the Background using JavaScript

    One option could be hide the form, and call click function of the submit button and in   MsCrmMkt.MsCrmFormLoader.on('formSubmit', function (event) - set the value of each of the field.

  • Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Make a Marketing Form Submission in the Background using JavaScript

    Hi Petr, Yes the idea is to  hide the embedded marketing form, sets its value based on other form on the page and than submit it.

  • Petr Jantac Profile Picture
    Petr Jantac on at
    RE: Make a Marketing Form Submission in the Background using JavaScript

    Hello,

    Could you please describe the intended use case? Why do you need to submit and embedded form in the background? This would help to find the proper solution.

    Thank you.

    Petr

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans