I need to create a file that will populate a value based on a yes or no selection
Example:
DROP DOWN FIELD: Improves Security? [yes, no]
NUMBER FIELD: If Improves Security = Yes, then value = 10, else = 0
I have tried manipulating this formula from docs I have been reading with no success
<script type="text/javascript">
priority = document.getElementById('Improves Security');
if (Improves Security) {
target = document.getElementById('customfield_10728');
// Hide the target field if priority isn't critical
if (improves security.value != Yes) target.style.display='none';
priority.onchange=function() {
if (this.value == Yes) {
target.style.display = '';
target.value="10";
} else {
target.style.display='none';
}
}
}
</script>
Is there another simple script I can use to achieve this?