You’re right that this is an InDesign omission. But then, when it comes to forms, InDesign is very weak, which is exactly what FormMaker is there to help with.
As you have found, there is no direct way of adding values to combo box items even with FormMaker.
But there’s an excellent workaround which I will describe, which I think you’ll find is actually almost as easy.
Once you’ve added this document script in InDesign, it will be there forever (for that document) so you need only do this once (of course, you can modify it as needed if changes need to be made to the form.)
Now you can save the PDF and distribute it to end users.
The script assumes that you have an InDesign document open with 2 combo boxes in it, called “Combo Box 1” and “Combo Box 2”.
c = this.getField("Combo Box 1"); c.setItems([["California", "CA"], ["Massachusetts", "MA"], ["Arizona", "AZ"]]); c = this.getField("Combo Box 2"); c.setItems([["Apples", "100"], ["Pears", "200"], ["Oranges", "300"]]);
The basic idea should be clear: We’re using the “setItems” command to add items and their values to each combo box. The items and their values are provided as a set of small 2-element arrays inside one larger array.
Hope that helps! If anything is unclear or if you have any other questions, post back.
- This reply was modified 1 year, 7 months ago by ~~Ariel~~.