Scott,
Thank you, I tried using your code to add the fields in the section to be required based on a specific criteria but it doesn't work. Here is the script, can you please help me identify what is wrong. It adds the asterisk to the fields but does not make them required as i am able to submit the form without completing the filling out the fields. AB_Section is the CSS class for my section. I have a drop-down where I have if a specific section is selected to execute a couple features, those work, but when i added the required piece to it, that part doesn't work.
$(document).ready(function(){
$('.AppType select').change(function(){
if ($(this).val()=='AB')
{
$('.AB_Section').show();
$('.AB_Section').closest('li').find('label').append('<span class="cf-required">*</span>'); $('.AB_Section').attr('required', 'True').addClass('required'); $('.OuterSection.collapsible').trigger('click');
$('.OuterSection').show();
}
else
{
$('.AB_Section').hide();
$('.OuterSection').hide();
$('.AB_Section').removeAttr('required', 'True').removeClass('required');
}
});
});