Copy link to clipboard
Copied
I have a drop down menu in a PDF called "selectedReg" that changes a text field.
I have the following in the Custom calculation script for the text field:
if (selectedReg=="1") event.value = "Text for option 1";
else if (selectedReg=="2") event.value = "Text for option 2";
else if (selectedReg=="3") event.value = "Text for option 3";
After the text is displayed, I need to add some additional text to it. But when I click out of the text field it will keep reverting to the default value.
Any easy way that I can make changes to the text field and make them stay?
Thanks!
You need to move the code to the custom validation script of the drop-down and change it to this:
var f = this.getField("name of text field");
if (event.value=="1") f.value = "Text for option 1";
else if (event.value=="2") f.value = "Text for option 2";
else if (event.value=="3") f.value = "Text for option 3";
Copy link to clipboard
Copied
You need to move the code to the custom validation script of the drop-down and change it to this:
var f = this.getField("name of text field");
if (event.value=="1") f.value = "Text for option 1";
else if (event.value=="2") f.value = "Text for option 2";
else if (event.value=="3") f.value = "Text for option 3";
Copy link to clipboard
Copied
Perfect, thanks!