Copy link to clipboard
Copied
Hello all,
I am having trouble with the following code. I entered it in the Document JavaScripts. The goal is when radio button "5k" is selected the text box (TotalLDD) fills with 5000. When radio button "100" is selected the text box (TotalLDD) is filled with "Enter Amount" and the user can enter an amount. Please help! So close to finishing this form!
var selectedValue = this.getField("LDD").value;
if (selectedValue === "5k") {
this.getField("TotalLDD").value = "5000";
} else if (selectedValue === "100") {
this.getField("TotalLDD").value = "Enter Amount";
}
Any insight is much appreciated.
Copy link to clipboard
Copied
Why did you place it there? Move it to the Mouse Up event of the radio-button fields, and change the first line to:
var selectedValue = event.target.value;
Copy link to clipboard
Copied
Why did you place it there? Move it to the Mouse Up event of the radio-button fields, and change the first line to:
var selectedValue = event.target.value;
Copy link to clipboard
Copied
Thank you try67. Made my day!

