web
You’re offline. This is a read only version of the page.
close
Skip to main content
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?

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 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,210 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,210 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 141

#2
DAnny3211 Profile Picture

DAnny3211 134

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans