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

Explorer ,
Jul 28, 2019 Jul 28, 2019

Copy link to clipboard

Copied

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

Views

151

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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?

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
Adobe Community Professional ,
Jul 28, 2019 Jul 28, 2019

Copy link to clipboard

Copied

Use only one \n

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