I am trying to make certain fields set to read-only for an approval step based on a radio button choice. The first date field gets set read-only just fine but all fields after are not being set.
Here is my current code:
$(document).ready(function () { WhoStart(); }); function WhoStart() { var StartValue = $(".RadioBtn input:checked").val(); if(StartValue == 'Super'){ $('.Date input').attr('readonly', true); $('.DropDown input').attr('readonly', true); $('.RadioBtn2 input').attr('readonly', true); } }
There are only two options for the Radio Button 1. 'Super', 'Not Super'
The idea is these fields are hidden the first time the document loads. I would make the choice radio button read-only as well so the form could not go back to open fields.