Forums

Forums / General Discussions / Two validation message

Two validation message

4 posts, 1 answered
  1. jahanzaib shahid
    jahanzaib shahid avatar
    8 posts
    Registered:
    08 Dec 2021
    21 Jan 2022
    Link to this post
    Two validation message is showing in TPC forms how to remove "please fill out this field" popup message because I already have applied TPC form required field validations.
  2. Brady Ward
    Brady Ward avatar
    92 posts
    Registered:
    19 Aug 2021
    Answered
    21 Jan 2022 in reply to jahanzaib shahid
    Link to this post
    Hello Jahanzaib,

    The additional popup you are seeing is generated by the browser because of the required attribute added to the field when you select the Required Field option. You can remove the popup by adding an event listener to the invalid event and preventing the default behavior. The following code snippet can be added to a page or template to accomplish the above:

    document.addEventListener('invalid', (function () {
         return function (e) {
            e.preventDefault();
         };
    })(), true);

    If you have any further questions please let me know. Also, feel free to reach out to support at support@crmportalconnector.com or join one of our daily Q&A sessions.

    All the best,

    Brady
    TPC Web Developer
  3. jahanzaib shahid
    jahanzaib shahid avatar
    8 posts
    Registered:
    08 Dec 2021
    26 Jan 2022 in reply to Brady Ward
    Link to this post
    thank you Brady its really helpful.
  4. jahanzaib shahid
    jahanzaib shahid avatar
    8 posts
    Registered:
    08 Dec 2021
    10 Feb 2022 in reply to Brady Ward
    Link to this post
    Hi Brady,
    Could you please tell me if I have multiple DateTime Field on a single form your code work only for one field so how to achieve this task ?
4 posts, 1 answered