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

Multi-select form field submission behavior

(0) ShareShare
ReportReport
Posted on by 15

Hello,

I need to include a multi-select field on Marketing form (Landing page form type) as a hidden pre-filled check-box, however, I need to achieve that if the Contact is already existing in the CRM database with a different value for this multi-select field, that value doesn't get over-written, but the pre-filled value get's added to the multi-select field on the Contact record.

So if on a Contact record I have multi-select field that specifies my contact type, which can be Type A, Type B or both, and I have a Contact which is classified within the system as Type A, but that contact submits a form for Type B Contact, after that form submission, the Contact is classified as Type A and Type B Contact, so the Type B hidden pre-filled value gets added to the contact type field and does not over-write the previously chosen Type A value.

How can one achieve that?

Thank you very much for your time and answer in advance.

All the best,

Marianna

I have the same question (0)
  • Suggested answer
    RodRodriguez Profile Picture
    on at

    This is something you could do with a JavaScript.

    To get you started, this is a JavaScript I have that will hide or show a separate field based on the value in a MultiOptionSet field.  Should be easy enough to modify to your needs by putting in some logic:

    function multiOptionSetHideOrShowField(executionContext)

    {

    var formContext = executionContext.getFormContext();

           var fieldObj = formContext.getControl("fax")

    var multiOptionSetFieldValues = formContext.getAttribute('new_multioptionset').getValue();

     if (multiOptionSetFieldValues == null)

     {

       fieldObj.setVisible(false);

     }

     else

     {

       if(multiOptionSetFieldValues.includes(2)) //When user will select multiple options and 'other'(value 2) is one of them

       {

         fieldObj.setVisible(true); //Specify true to show the field; false to hide the field.            

       }

       else

       {

         fieldObj.setVisible(false);

       }

     }

    }

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