Skip to main content
Participant
November 28, 2017
Question

ListBox/Dropdown in template

  • November 28, 2017
  • 3 replies
  • 889 views

Hi,

is there a way/script to create a list box in document template? I would like to prepare a template for another user, where he/she creates a document with pictures and metadata captions, and has an option to specify the content of these metadata before exporting final document as .pdf. I would prefer dropdown list more than textfield or another editing of exported document.

Thank you

This topic has been closed for replies.

3 replies

Inspiring
November 29, 2017

So I could imagine an event-listener that fires when you open your template. You probably want to tag this template with some identifier so that the event-listener can be smart about when to take the next step.

Which would be displaying a panel with your dropdown menu. Where does your list of choices come from? It's simple to hard-code it into your script, but that can be hard to maintain.

Then comes the script that places the pictures and captions the user selects in the dropdown. Depending on the complexity of the layout, you might want to think about storing the various geometries in a library, so that the script simply has to place the appropriate library asset. Again, a matter of maintenance: It's usually easier to modify a library item than to edit a script.

I could even imagine a world where the library informs the drop down. In other words, you store a library asset with a name or "description" that you want displayed in your dropdown. But that might be getting ahead of story.

Bob

Luku1822Author
Participant
December 5, 2017

Hi

thank you for your reply

Well my layout is not complex at all, a few lines, captions and a picture. Every caption has a corresponding description in a text frame. I would like this text field to behave like combo box before I export document to pdf. Editable list of choices would be the best solution, but it is not necessary, i can imagine updating it very rarely. Another reason is that it´s not even possible (to my knowledge) to set the font type except height when creating combo/list box..

thank you for your time!

Lucas

Inspiring
December 6, 2017

Not sure what we're supposed to be looking at here.

If you're looking for an interactive document, I can't help you. I'm just a humble newspaperman and we don't go in for buttons and dropdowns on our pages.

My thought would be to use ScriptUI to create a custom panel.

lfcorullon13651490
Legend
November 28, 2017

Hello.

Yes, of course. But you need to be more specific about what you want.

Barb Binder
Community Expert
Community Expert
November 28, 2017

I'm going to move this to the InDesign Scripting forum for you, Luku1822, to increase the chances of getting you an answer.

~Barb

~Barb at Rocky Mountain Training