Thanks to Jason Smith's help here I was able to get my form sections to hide based on which process step they were on by using Javascript to check a field. Now I need to know how to mark a section (or all the fields in that section) read only using Javascript. I'm not familiar with Javascript so I've just been trying different examples people have posted that relate to this but can't quite get it working. I've marked the section and all fields within the section with css class "section1RO". I've tried the following scripts and the best that happens is the text field will be readonly but not the radio, check mark or drop down fields.
If anyone knows what I can do with this script to get it working or where I can find resources that talk about the differences between test/radio/checkmark/dropdown fields and their attribute/properties?
$(document).ready(function() {
if ($('input[name="stepid"]').val() == "68") {
$('.section2 input').click();
} else {
$('.section2 input').prop('checked',false).change();
$('.section1RO input').prop('readonly'); //with and without the input, with attr, with .val, and with/without , true.
}
});