I'm attempting to make a PDF form for clients to order event services. I have a field that I want to populate with a number based on their upgrade choices that are set as radio buttons. If they choose option 1 or 2, the upgrade price is X. If they choose option 3 or 4, the upgrade price is Y. I want the text field to display either X or Y based on their choice. Or just 0 if they choose not to upgrade.
JavaScript is pretty far out of my knowledge base but I'm attempting to figure this out anyway. Any help? What I have below (and everything else I've tried) is not working.
if (btn1.checked){
event.value = 162;
} else if (btn2.checked) {
event.value = 182;
} else if (btn3.checked) {
event.value = 162;
} else if (btn4.checked) {
event.value = 182;
}