I have a radio button field ('.sectionheadDecision') with three choices - Approve, Reject, Terminate.
I am using javascript to control the display of the action buttons, but I can only get two out of three to display properly. In the script below, the Approve ('.Approve') button appears by default. The Reject button ('.Submit') appears when the Reject choice is selected, but when the Terminate ('.Reject') choice is selected the Approve button appears again.
$(document).ready(
function() {
{
$
$('.Approve').show();
$('.Reject').hide();
$('.Submit').hide();
}
});
$(document).ready(function() {
$('.sectionheadDecision').click(function() {
if($('input[value="SectionHeadTerminate"]').is(':checked'))
{
$('.Approve').hide();
$('.Reject').show();
$('.Submit').hide();
}
else {
$('.Approve').show();
$('.Reject').hide();
$('.Submit').hide();
}
});
});
$(document).ready(function() {
$('.sectionheadDecision').click(function() {
if($('input[value="SectionHeadReject"]').is(':checked'))
{
$('.Approve').hide();
$('.Reject').hide();
$('.Submit').show();
}
else {
$('.Approve').show();
$('.Reject').hide();
$('.Submit').hide();
}
});
});
I've done this many times with two radio button choices, so I'm not sure what I'm missing when adding a third choice. Thank you.