I have dropdowns that are 'Allow custom text entry' enabled. When a user adds a new item, is there a way for that item to be added/appended to the existing Object > List Items?
from way... underground at Parkes - central West NSW - Australia
My Product Information:
LiveCycle Designer, Windows
Of course, but it takes a bit of tricky scripting. Probably the best way to do it is to use the "Format" event to detect new entries and then add them to the list items. You can find scripts for modifying a combo(dropdown) list in this article:
This example uses a regular list field. But it will also work for a dropdown.
The most reliable way to detect a new entry is to compare the input to all existing list entries. Seems tedious, but that's just what has to be done.
Thom Parker The source for PDF Scripting Info [url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often [url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat [url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url] [url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
http://www.acrobatusers.com/tutorials/2007/10/list_and_combo_in_lc
This example uses a regular list field. But it will also work for a dropdown.
The most reliable way to detect a new entry is to compare the input to all existing list entries. Seems tedious, but that's just what has to be done.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script