Skip to main content
Participating Frequently
Oct 19, 2017 7:40 PM UTC
Answered

align horizontally text field in acrobat

Hello everybody. Is there any way to align a line of a text field horizontally, and then, when you press enter, the two lines of text are both horizontally aligned as well? please check this image, to make it more clear.

    

Maybe some javascript code to solve it?

thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.
Joel Geraci
Joel GeraciCorrect answer
Community Expert
Oct 20, 2017 12:25 AM UTC

If you allow rich text formatting, a user can select the text in the field and then use the properties toolbar to format the selection to vertically center but you can't force them to do so. If you enter a value (not a default value) and do the formatting for them, they can edit it and your formatting will "stick" however, the formatting will get reset if they clear the form.

In short, it can be done but can't be enforced.

4 replies

Joel Geraci
Community Expert
Community Expert
Oct 19, 2017 7:49 PM UTC

No need for JavaScript. Just set the field Options to align center and multiline.

If you were thinking of having them also center vertically in the field height... No. It can't be done... even with JavaScript.

Translate
Participating Frequently
Oct 19, 2017 11:39 PM UTC

yes, i mean center the height field...

Translate
Joel Geraci
Community Expert
Joel GeraciCommunity ExpertCorrect answer
Community Expert
Oct 20, 2017 12:25 AM UTC

If you allow rich text formatting, a user can select the text in the field and then use the properties toolbar to format the selection to vertically center but you can't force them to do so. If you enter a value (not a default value) and do the formatting for them, they can edit it and your formatting will "stick" however, the formatting will get reset if they clear the form.

In short, it can be done but can't be enforced.

Translate