I want to hide a field when anything but "Yes" is selected in the radio button field preceding it.
def selectRadioField = getFieldById("customfield_13802")
def selectRadioValue = selectRadioField.value
def listField = getFieldById("customfield_11015")
if (selectRadioValue == "Yes") {
listField.setHidden(false)
listField.setRequired(true)
} else {
listField.setHidden(true)
listField.setRequired(false)
}
I am defaulting to "No" in the radio options and the listField is initially hidden. If I select "Yes" nothing happens. If I change the listField to shown, it still shows when "No" is selected by default and switching from "No" to "Yes" then back to "No" does nothing.