Text Field changes when dropdown option changes
- January 29, 2025
- 2 replies
- 220 views
Hello all,
I've done some hunting, but I can't seem to find answer for my question. (If it's been answered elsewhere, I'd appreciate a link).
I'm working on a PDF with dropdown menus that determine the text in corresponding text fields. For all but the first field, it is working correctly. If it the dropdown menu is blank, the text field is blank. If the dropdown option moves to 2, the text field changes to .25. When the dropdown changes back to blank, the text field changes back to blank.
For all except the very first box. For each dropdown box, I've set up the custom calculation script as follows (direclty copied):
var f = this.getField("Score5");
if(event.value == "1")
f.value = ".0";
else if(event.value == "2")
f.value = ".25";
else if(event.value == "3")
f.value = ".50";
else if(event.value == "4")
f.value = ".75";
else if(event.value == "5")
f.value = "1.00";
else if(event.value == " ")
f.value = "";
I also have the "Commit selected value immediately" set for all dropdown boxes.
Here is the direct copy for the first dropdown box:
var f = this.getField("Score1");
if(event.value == "1")
f.value = ".0";
else if(event.value == "2")
f.value = ".25";
else if(event.value == "3")
f.value = ".50";
else if(event.value == "4")
f.value = ".75";
else if(event.value == "5")
f.value = "1.00";
else if(event.value == " ")
f.value = "";
I'm not sure where I went wrong with just DropDown1 that it does not update Score1 text field when the blank option is set. I've attached a short video showing the issue.
Help?
