This might be simple but I'm having difficulties here. I'm running the required attribute through all fields of .um_frm
and then checking if all fields are not empty. My problem is that instead of checking ALL fields, it passes through even if a single field is filled. How do I make sure that all fields are filled?
$('#um_ok').on( 'click', function() {
$('.um_frm').attr('required','required');
var value=$.trim($(".um_frm").val());
if(value.length === 0){
//proceed...
}
});
I also tried this but was not suiccessful
$('#um_ok').on( 'click', function() {
$('.um_frm').attr('required','required');
if($.trim($(".um_frm").val()) === ""){
//proceed...
}
});