Inspired by a video on PDF Form javascript to transfer values of Checkbox to a text field in a proper listed format
I tried to name the checkbox field in a sequence manner cHob.01, but dot(.) is not accepted in name field of checkbox, I then named my name field sequence in cHob1, cHob2, cHob3 and then I created the declared variables and set an array as described in video here is the code, but its not working
var items = [ ];
for (i = 0; i<10; i++) {
var Hobbies = this.getField("cHob1"+ i);
if (Hob.value !="Off"){
items.push(items.length+1 + ". " + Hob.value);
event.value = "Your Hobbies are listed below: "+ "\n" + items.join("\n");
}
if(items.length<=0) {event.value = " "}
}
The above code works fine in acrobat dc pro as in video but not in scribus.
[attachment deleted by admin]