I am trying to display a Label type field only on the condition that the Issue type is Inspection Defect. This is the code that I am using:
<script type="text/javascript">
issuetype = document.getElementByName('issuetype');
if (issuetype)
{ target = document.getElementById('customfield_11200'); // Hide the target field if issuetype not Inspection Defect
if (issuetype.value != 7)
{ target.style.display='none';
}
else
{ target.style.display='inline';
}
}
</script>
Please let me know if I need to change anything.