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

how to break a text line in a drop down to a text field

Participant ,
Jul 28, 2019 Jul 28, 2019

This should be pretty easy. I made a drop down with rather long entry listings. The selection from the drop down shows into a text field (multi-line). What I wanna do is control how the text flows in the text field. I wanna break the line of text where I want it to break to the next line. In essence making a double space or single. I've tried placing the \n and \r in the drop down listing but that didn't do anything. So, I was wondering how that would be done (or even if it's possible). Can someone help me figure this out? It's driving me a little more nuts. Thanks.

TOPICS
Acrobat SDK and JavaScript
738
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
LEGEND ,
Jul 28, 2019 Jul 28, 2019

Have you tried to use JavaScript to set the dropdown/list box item/optional value?

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
Participant ,
Jul 28, 2019 Jul 28, 2019

Thanks for getting back to me and for your suggestion. I tried this script -

this.getField("Footings").setItems(new Array(["All posts will be set into 2' x 3' concrete.\n\nWork will be performed in a professional workmanlike manner."],["All posts will be set into 3' x 3' concrete.\n\nWork will be performed in a professional workmanlike manner."],["All posts will be set into 4' x 3' concrete.\n\nWork will be performed in a professional workmanlike manner."],["All posts will be set into 5' x 3' concrete.\n\nWork will be performed in a professional workmanlike manner."],["All posts will be set into 6' x 3' concrete.\n\nWork will be performed in a professional workmanlike manner."]));

but this script spaces the entries in the drop down. Looks bad. Although, it puts the text into the text field the way I want. I don't want the line spacing in the drop down though. Is there a way to have it both ways?

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 ,
Jul 28, 2019 Jul 28, 2019
LATEST

Use only one \n

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