Hi All! I have tried Atlassian Support with this question but they have suggested I ask the community as this is a customization.
I would like a field to display based on the value of a radio button field. Think of it like this: Field A (radio button) - "More info required: Yes/No". Field B (free text) - "Enter more information". Field B will display if Field A is "Yes" but will be hidden if it is "No"
I have followed the script provided in this KB and I can get the script working where Field A is a drop down. See my commented code to help me understand how it works:
<script type="text/javascript">
// Set the query field to lookup the value of here
query = document.getElementById('customfield_10000');
if (query) {
// Set the target field to show or hide based on the query field here
target = document.getElementById('customfield_14282');
// Hide the target field unless the query value already matches
// what you want it to be
if (query.value != 17830) target.style.display='none';
// On change, show the target field if query value matches
// what you want it to be else hide it
query.onchange=function() {
if (this.value == 17830) {
target.style.display='';
// Show some placeholder text, if you want
// target.value="Enter something here!";
} else {
target.style.display='none';
}
}
}
</script>
Can any one assist with a way to read the value of a radio button field? They seem to respond differently to a drop down.
Many thanks,
Matthew
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.