3
Script to list dropdown responses
New Here
,
/t5/acrobat-discussions/script-to-list-dropdown-responses/td-p/14100458
Sep 20, 2023
Sep 20, 2023
Copy link to clipboard
Copied
I have a questionaire with drop down boxes with Y or N option for each question
Looking to produce CSV text Y =1 N=O to list responses once selected
trying this below but doesnt work as intended. Any help would be appreciated.
event.value = "";
var a = this.getField("dropdown1").value;
if(a != "Y"){
event.value = "1, ";
}
else if(a != "N"){
event.value = "0, ";
}
var b = this.getField("dropdown2").value;
if(b != "Y"){
event.value += "1, ";
}
else if(b != "N"){
event.value = "0, ";
}
TOPICS
JavaScript
,
PDF
,
PDF forms
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/acrobat-discussions/script-to-list-dropdown-responses/m-p/14100523#M430011
Sep 20, 2023
Sep 20, 2023
Copy link to clipboard
Copied
In the last condition you should use
event.value +="0, "
instead of
event.value ="0, "
as that will overwrite any previous values you applied.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

