MediaWiki:Gadget-FormCheck.js: Difference between revisions

From Tsadra Foundation Advanced Contemplative Scholarships
((by SublimeText.Mediawiker))
 
((by SublimeText.Mediawiker))
Line 1: Line 1:
$(document).ready(function() {
$(document).ready(function() {
   
   
if($(".MustField").val().length == 0) {
if( $('.MustField').filter(function() { return this.value === ''; }).length === 0 ) {
     console.log("All not filled!");
     console.log("All filled");
} else {
} else {
     alert("All filled.");
     console.log("All not filled");
    return false;
}
}
return false;


});
});

Revision as of 04:27, 20 May 2024

$(document).ready(function() {
 
if( $('.MustField').filter(function() { return this.value === ''; }).length === 0 ) {
    console.log("All filled");
} else {
    console.log("All not filled");
}
return false;

});