Adobe Acrobat Reader mulitline test field.

Community Beginner ,
Mar 28, 2021 Mar 28, 2021

Copy link to clipboard

Copied

Hi,
I have a question.
I create forms in Adobe Acrobat Reader DC and ask if there is an option to add multiline text in the "drop-down list" field.
I mean, after selecting a text from the list, it should be divided into several rows.

Can you add some code, eg JS, in the properties of this field?

 

I will be grateful for your help.

 

TOPICS
How to, PDF forms

Views

190

Likes

translate

Translate

Translate

Report

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

correct answers 1 Correct Answer

Most Valuable Participant , Mar 28, 2021 Mar 28, 2021
If you're creating forms it's not likely you're using Acrobat Reader, but the full Acrobat.   To answer your question: It is possible, but it's an undocumented (and buggy) feature, so I would advise against using it. It can only be done using a script, like this:   this.getField("Dropdown1").setItems(["Item1 Line1\nLine2", "Item2", "Item3"]);

Likes

translate

Translate

Translate
Most Valuable Participant ,
Mar 28, 2021 Mar 28, 2021

Copy link to clipboard

Copied

If you're creating forms it's not likely you're using Acrobat Reader, but the full Acrobat.

 

To answer your question: It is possible, but it's an undocumented (and buggy) feature, so I would advise against using it. It can only be done using a script, like this:

 

this.getField("Dropdown1").setItems(["Item1 Line1\nLine2", "Item2", "Item3"]);

Likes

translate

Translate

Translate

Report

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 Beginner ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

Oh crap I wrote a reply 2 days ago and now I can see that it hasn't sent out after all. 🙂


Thanks for answering that, and I will try to use it despite your warnings.

I still have a question, I'm not the best at JS, could you please describe a little more where I can use the script you wrote above?

Likes

translate

Translate

Translate

Report

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
Most Valuable Participant ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

From the JS Console is the best way. Press Ctrl+J, paste the code into the editor, select it with the mouse/keyboard and press Ctrl+Enter to run it.

Likes

translate

Translate

Translate

Report

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