Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Pro DC Form multiline dropdown list text wrap

New Here ,
Jun 21, 2017 Jun 21, 2017

I have a dropdown list in my form made in Adobe Pro DC with 7 entries, some of which are quite long. They do not fit in the space I have designated on the form. Is there a way to script, so that the text wraps and shows all the information?

Thanks in advance.

wraptext.jpg

TOPICS
PDF forms
5.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2017 Jun 21, 2017

You can include line-breaks in the items when you use a script, but it's an undocumented feature and a bit buggy, so I would advice against it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2017 Jun 22, 2017

Thank you for the reply. I have read that in other forums, but unable or do not know the script needed, nor where to place it. I presume Properties/Format/Custom Format Script. Can you point me in the right direction or give me a sample script? I need to try it at least, else will not be able to use it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017

No, this script doesn't need to be placed anywhere under the field itself. You need to run it from the Console.

An example would be:

var items = ["Item 1\nSecond line of text", "Item 2\nSecond line", "Item 3"];

this.getField("Dropdown1").setItems(items);

After running it you'll see that it looks and behaves in an odd way. For example, the last item will switch locations between being on the first line and the second one...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2017 Jun 22, 2017

You were right, last became first. Added it as Custom Command, Execute Java Script under Action Wizard. At least I have a place to play and learned another area in PRO!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2017 Jun 22, 2017

Sorry Try67, I feel like it might take me that many tries. At first it was looking promising. But now I've updated/changed the Execute Javascript and the changes do not show. Then in a new document none of the javascript populates in the drop down. Feel like I'm missing something. Was this not where/how to add it?

Custom Command, Execute Java Script under Action Wizard

Are these commands part of the PDF or my settings for PRO?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017
LATEST

No, they are not a part of the PDF. They are an Action that resides in

Acrobat. You need to run it on the files that you want to edit in this way,

or use the JS Console, as I've recommended. And of course, if the drop-down

is not named the same you'll need to adjust the code between each run.

On Thu, Jun 22, 2017 at 9:47 PM, Techolicious <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines