Skip to main content
Inspiring
December 3, 2018
Answered

add a new entry/delete in my array with custom option in my dropdown list

  • December 3, 2018
  • 1 reply
  • 474 views

i want a user add new entry in array when write custom text to dropdown list e.g.:

var MyItems = new Array(

" ",

"apple",

"orange",

"mango",

);

MyItems.sort();

this.getField("Dropdown7").setItems(MyItems);

user write in dropdown list : apple system return message this value is in array!

user write Banana

var MyItems = new Array(

" ",

"apple",

"banana",

"orange",

"mango",

);

MyItems.sort();

this.getField("Dropdown7").setItems(MyItems);

also if user want to delete a entry in my array how to solve this on PDF mode?

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Thom Parker

Here's an article that covers this exact issue, and there is a download sample:

https://acrobatusers.com/tutorials/list_and_combo_in_lc

Here is another more complete discussion on lists in Acrobat

https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
December 3, 2018

Here's an article that covers this exact issue, and there is a download sample:

https://acrobatusers.com/tutorials/list_and_combo_in_lc

Here is another more complete discussion on lists in Acrobat

https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often