Thursday, May 31, 2018

Using jQuery for Validation

If you want to make a column required based on non-standard column validation, you can do so via jQuery by creating a function to make the field red and disable the Save button like so:

function MakeFieldRequired(fieldId) {
    $("input[value$='Save']").attr('disabled', true);
    $("span[id^='" + fieldId+"']").css('color','red').css('font-weight','bold');
}