count the form valitadion errors and print output to html
-
Hello codepeople !
I tried to do that with my own logic.This is maybe another historical moment (disaster:)) for you software developers ?? Laugh free..
<script> jQuery(document).on( 'click', '[id*="fieldname143_"]', function () { var errorCount = 0; var first = '[id*="fieldname' ; //string var counter = '0' ; //string !! I am not sure this string will be integer in for loop var second = '_"]' ; //string var id = first + counter + second ; //sum side by side output == [id*="fieldname0_"] for (counter = 0; counter < 300; counter++ ) { //now it is integer if (jQuery('id').each().hasClass('.field.cpefb_error:visible')) { errorCount = errorCount+1 Query( '.myclass .uh').html(' Please fill in ' + errorCount + 'missing information.'); } } }); </script>
Best Regards,
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘count the form valitadion errors and print output to html’ is closed to new replies.