changing the language of error message in required field in html5 contact form

后端 未结 9 934

I am trying to change the language of the error message in the html5 form field.

I have this code:



        
9条回答
  •  攒了一身酷
    2020-11-27 13:47

    Do it using JS. Grab the class of the error message, and change it's content for whereever it appears.

    var myClasses = document.getElementsByClassName("wpcf7-not-valid-tip");
    
    for (var i = 0; i < myClasses.length; i++) {
        myClasses[i].innerHTML = "Bitte füllen Sie das Pflichtfeld aus.";
    }
    

提交回复
热议问题