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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 202 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans