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

Can I show/hide a group of fields based on a dropdown value?

(0) ShareShare
ReportReport
Posted on by 105

In a markeiting form, the user can order an info brochure.
Based on the value of a dropdown (by email or by post) the streed address fields should show or hide.

When the user chooses by post, the street address fields should show, when they choose by email they should be hidden.
Is this possible with Dynamics 365 Marketing app forms?

Example here:

hfh_5F00_ani.gif

I have the same question (0)
  • Suggested answer
    Carlo Velasco Profile Picture
    787 on at

    Hi

    Yes, you can extend the functionality of marketing forms through custom code.

    Please refer to:

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

  • KE Communication bh Profile Picture
    105 on at

    ………………………………………...

  • KE Communication bh Profile Picture
    105 on at

    Okay, I was able to Hide a section using this code:

    <script>

    MsCrmMkt.MsCrmFormLoader.on('afterFormLoad', function(event) {

    document.getElementById('postanschrift').style.display= 'none';

    });

    </script>

    WHAT DOES NOT WORK, is if I want a function to be called when I change the dropdown:

    <script>

    document.getElementById('696494fc-72e0-ea11-a813-000d3a387ed9').onchange = function() {

    document.getElementById('postanschrift').style.display= 'block';

    }

    </script>

    Why does the onchange not work?

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

#2
#ManoVerse Profile Picture

#ManoVerse 59

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans