Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Find out text Wrapped or not

Avatar

Level 6

One of our templates require different formatting requirements based on text wrapping....the textField being populated from XML using Schema we need to determine this status at the time of rendering the form. Is there a way to find out if the text in a given TextField is wrapped or not?

Thanks in Advance,

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You can use the h method of the layout object to test an objects height, something like;

xfa.layout.h(TextField1,"in")

So if your field expands to fit then you can test to see if it has expanded.  You would have to call this once your form is rendered ... maybe in the layout:ready event.

Regards

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

You can use the h method of the layout object to test an objects height, something like;

xfa.layout.h(TextField1,"in")

So if your field expands to fit then you can test to see if it has expanded.  You would have to call this once your form is rendered ... maybe in the layout:ready event.

Regards

Bruce

Avatar

Level 6

Thank you for your suggestion...I resolved my issue with additional tricks using your suggestion as center piece of code.