Hello,
I'm working on this question, and may be making some progress. My code currently is:
$(document).ready(function () { $('.cf-table-block tbody tr').on('change input','input[id^=Field16], .SCCheck input', function() { if (!this.value) return; if ($('input[id^=Field16]').val() == $('.SCCheck input').val()) { $('.Submit').prop('disabled',false); } else { $('.Submit').prop('disabled',true); } }).find('input.Submit').prop('disabled',true); }); $(document).ready(function () { $('.read-only input').attr('readonly',true); $('.cf-table-add-row').click(function () { $('.read-only input').attr('readonly',true); }); });
This checks the Lot Check (hidden) field against the Stock Code Check (hidden) field. If they match, the submit button is enabled. If not, it is disabled. The problem I am running into is that it only validates the first row of the table. I need it to check each row, and if even one is wrong, I need the submit button to be disabled (and ideally a message to let the user know which Lot # is not matching). A screenshot is attached. Any help is greatly appreciated.
Thanks