Thank you. But I have some 70 fields that are conditionally shown and hidden.
So I was trying to find some option to identify all those hidden elements at once, instead of building an array, on PreSaveAction
The below code does the trick to reset the select dropdowns . But I was wondering if there is a better way or inbuilt option?
function PreSaveAction()
{ $("td[<strong>style$='display: none;</strong>']").closest('td').find("input").each(function(j) {
$(this).attr('value','');
});
$("td[style$='display: none;']").closest('td').find("select").each(function(i) {
$(this).prop('selectedIndex','-1');
});
}
Is there an easy way to set fields to Not required when the fields are hidden in a dffs form? I am using flag_Mandatory and clear_Mandatory to conditionally make fields required and vice versa but it’s becoming very messy when I have multiple functions being called amking some fields to show and others to hide.