Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Hidden fields in marketing forms

(0) ShareShare
ReportReport
Posted on by 35

I have created some fields related to contacts which I want to include in a marketing form as hidden fields.

Unfortunately I am unable to select the "Hide field" toggle as it is not visible for the fields I created.

The standard field "Do not email" is set as a two option checkbox with a contact mapping to "Do not allow buld emails" and can be marked a hidden.

My field "Tracking" is set as a two option checkbox with a contact mapping to "Do not track" and can not be hidden. The toggle is not even visible.

What am I missing?

  • cloflyMao Profile Picture
    25,208 on at
    RE: Hidden fields in marketing forms

    Hi Neil,

    OK. As you said, the hidden attribute could help us to hide the field manually.

    <div data-editorblocktype="Field-radioButtons" hidden="hidden">  

    I have searched through related documentation:

    https://docs.microsoft.com/en-us/dynamics365/marketing/custom-template-attributes#identify-design-elements

    however, I didn't find any note section which told us that the hide option field is not available to optionset field.

    If you had found any answer helped, please kindly mark as verified to close the thread, it would be really appreciated. :)

    Regards,

    Clofly

  • NeilSmith Profile Picture
    35 on at
    RE: Hidden fields in marketing forms

    Thanks for the tips.

    I think I'll stick to setting it as hidden in the html until it gets "fixed".

    Neil

  • Verified answer
    cloflyMao Profile Picture
    25,208 on at
    RE: Hidden fields in marketing forms

    Hi Neil,

    It seems that the issue is by design: hide field option is not available to Option set field(either radio buttons or dropdown.)

    You could change its data-editorblocktype attribute to another element name, e.g: data-editorblocktype="Field-radioButtons" →  data-editorblocktype="Field-checkbox".

    Then "hide field" option will be available again, and from my test, marketing form can still be submitted successfully; 

    the only problem is that the field will be not able to set a default value by form designer tool, but we could run javascript to solve it.(After form is rendered, here is introduction about Marketing form API.)

    pastedimage1593572340051v2.png

    Or we could do it without code:

    From beginning we set the field a default value with data-editorblocktype="Field-radioButtons",

    pastedimage1593572569837v3.png

    then change the attribute to Field-checkbox to enable hide field option.

    pastedimage1593572876008v4.png

    Please wait for this issue to be fixed in future release.

    Regards,

    Clofly

  • NeilSmith Profile Picture
    35 on at
    RE: Hidden fields in marketing forms

    Thanks for the tip.

    I got it working for this field now.

    However another field which I want to use to set Consent given doesn't work.

    The field is an Option set set to radio buttons (or dropdown) and mapped to the contact fied Consent given.

    When I add this field to a form no option to hide the field is available in the properties.

    I could set it as hidden in the html but this makes later editing by others awkward as they would need to know that the hidden property is set in the html for this field.

  • cloflyMao Profile Picture
    25,208 on at
    RE: Hidden fields in marketing forms

    Hi Neil,

    The toggle is expected to be available for any field which is added by drag-and-drop from element in Toolbox tab.

    pastedimage1593508759797v1.png

    You could check whether data-editorblocktype="Field-checkbox" attribute has been added for your checkbox element properly in HTML source code view.

    8637.JPG

    If we remove the attribute, the input field will be no longer selectable and editable, thus the toggle won't appear.

    Regards,

    Clofly

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,251 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,984 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans