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

apply css style to multiselect option set in marketing form in dynamics 365

(0) ShareShare
ReportReport
Posted on by 69

Hi
I want to use multi-select option set field on a landing page.
can I use a multi-select option set field with Marketing form?

i just tried to add a multi-select option set field in a marketing form. the option values were displayed as shown in the image. how I can add CSS style to the multi-select option set field to display the options with line break. (each option to be displayed in a separate line. can you provide me sample CSS style code to include in my marketing form to format the multi-select option set field?

multiSelectoption.GIF

thank you so much,

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

    Hi Siva,

    Yes, we can add multi-select option to marketing form.

    It seems that your CSS rule for your checkbox item layout is broken, you could open inspector(F12) to debug display layout and try to fix the issue.

    E.g: 

    1. As expectation, each option shall be nested in a span element whose class name is "lp-checkboxListItem".(Include a checkbox and corresponding value)

    There is a key css rule to make each of them with line break.

    display: block;

    tILLbOEdIv.png

    2. However, if I disable the display: block; rule for lp-checkboxListItem span element,

    then remove float:left rule for each of checkbox, 

    I will get same layout with issue as you encountered.

    pUnvMdO5C8.png

    3. Suggestion:

    I copied the CSS rules for normal layout, you could copy and paste CSS rules below to your marketing page or marketing form source code to test whether it could fix the layout.(in Style tag)

    div[data-editorblocktype=Field-checkboxList] input,
    div[data-editorblocktype=Field-checkbox] input {
        width: auto;
        height: auto;
        margin-bottom: 3px;
        margin-right: 8px;
        float: left!important;
    }
    
    div[data-editorblocktype=Field-checkboxList] span.lp-checkboxListItem,
    div[data-editorblocktype=Field-radioButtons] span.lp-radioButton {
    /* This rule is needed to style all radio button fields. For product constraints each option is defined as input and label wrapped into a span*/
        display: block!important;
        margin: 2px;
    }

    !important declaration will override any other declarations.

    Regards,

    Clofly

  • Iva Kanova Profile Picture
    5 on at

    Thank you! I was facing the same issue even though all the css looked correct. What finally made it stick on the pages was the !important declaration.

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

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans