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

How to disable error validation from Dynamic 365 marketing form

(0) ShareShare
ReportReport
Posted on by 14
Is there any way to disable in-built error validation( This field is required ) for Email in Dynamic 365 Marketing Form? We were able to disable for First name and Last name. Basically we have implemented custom error validation but along with that we're getting in-built error pop-up as well which is not required now as shown in attachment. We tried to remove that validation from Form designer but then we're not able to Save the form.
 
////
I have the same question (0)
  • LanceP1906 Profile Picture
    54 on at
    Anytime you begin to mess with the OOB structure, you run the risk of the form/email no longer being stable. 
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
     Hi,
     
    Marketing form provides the OOB function to set the error validation ( This field is required ).
    1. For the outbound marketing form the settings are as follows.

     
    2. For the real-time marketing form the settings are as follows.

     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Dengliang Li
  • Community member Profile Picture
    14 on at
    As I mentioned, we were able to set required property off for first name and last name fields but not for email field. While trying for email, we're getting below error and not able to save form:
     
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Since the matching strategy associated with the form matches based on email addresses by default, the email field must have the Required attribute set.

    However, the matching strategy must have at least one matching attribute. Otherwise, the form will report an error.

    Therefore, it is possible to change the matching attribute in the matching strategy and set it to another field. In this way, the email field will not be forced to be set to the Required attribute.

     
    It is important to highlight that the field associated with the matching attribute in the matching strategy must be added to the form and must be set to the Required attribute.

     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Dengliang Li
     
  • Community member Profile Picture
    14 on at
    Okay. This way we're good for first name , last name and email fields but we need to keep the new Field( for example City ) on page as well and without that we won't be able to Save the form. Correct?
    We need only three fields in form first name , last name and email
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Your understanding is correct.
    It is a design requirement of the product that at least one field of the required attribute needs to exist in the form.
     
    Best Regards,
    Dengliang Li
     
  • Community member Profile Picture
    14 on at
    Got it. Make sense.
    Well, in order to meet custom error validation we have added below JS code in form HTML script tag. Is that correct approach for this custom implementation?
    document.getElementsByTagName("form")[0].addEventListener("invalid", function(e){e.preventDefault();}, true);
     
     

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

#2
#ManoVerse Profile Picture

#ManoVerse 59

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans