I'd like to require all columns in this table if the Date of FlexTime field is not blank in each row:
I cobbled together this code from Answers and some other sites, but it is only requiring the Flex Hours field in the first row before letting me submit the form.
$(document).ready(function () { $('.cf-table-block').on('blur', 'input', checkdate); function checkdate() { $('.cf-table-block tbody tr').each(function () { if ($(this).find('.dateFlex input').val() != "") { $(this).find('.hoursFlex input, .typeFlex input, .reasonFlex input').attr('required', true); } else { $(this).find('.hoursFlex input, .typeFlex input, .reasonFlex input').attr('required', false); } }); } });
Any advice welcome.