Hello. I use this script to change the color of all rows for the radio buttons depending on which row is selected it will change all the radio buttons color.
$(document).ready(function() {
$('#q82').on('click', function(e) {
if (e.target.value == '1 Low') {
$('#q82 span label').css('color', '#0c850b');
}
else if (e.target.value == '2 Low-Medium') {
$('#q82 span label').css('color', '#b7b700');
}
else if (e.target.value == '3 Medium') {
$('#q82 span label').css('color', 'Orange');
}
else if (e.target.value == '4 Medium-High') {
$('#q82 span label').css('color', '##f5837b');
}
else if (e.target.value == '5 High') {
$('#q82 span label').css('color', 'red');
}
});
});
I have stored the radio button under variable 'urgency'
I have used the same radio button variable on subsequent forms to alert each dept of the, well... urgency of their task. Though the button selection keeps, the color assigned does not. Below is the script I used during the selection of the original radio button selection.
Currently, if 5 High was selected, 5 High correctly is shown on subsequent forms. I am looking to adjust the script so when the form loads, it looks at the value of the radio button made from the originating selector and assigns the correct colors as well. Can someone assist please?