Skip to main content
bebarth
Community Expert
Community Expert
December 14, 2019
Question

Item classification for a drop-down menu in a dialog box

  • December 14, 2019
  • 1 reply
  • 1034 views

Hi,

When I create a drop-down menu in a dialog box (list of the fields for example), the items are classified in the unicode character order.

Is it possible to sort them in a customized order or indicate the position of the items?

thanks in advance.

@+

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
December 14, 2019

No. If you want them sorted in another way you can do so by adding "1.", "2.", etc. before them.

Thom Parker
Community Expert
Community Expert
December 14, 2019

Well actually, there is an undocument function for inserting items into a list. Items are added to the end of the list. 

 

dialog.insertEntryInList({"item_id":{lst}});

 

where "lst" is the normal object used to initialize a list. It can be one item. 

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