Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

Expdant to fit, height value


Level 5

I have a textfield "t1" set to expand to fit for the heigth value.

I want some other textfields have the same heigth that t1 when it is growing up.

In the script event ,t1.h has 0in as value when it is expand to fit. How can I take the h value of my textfield ?

3 Replies


Level 10
When you ask for the h value in that way you are asking the template dom. The value reported will be for when it was loaded. You need to ask the Layout Dom for the same value. It will have the updated information. You can use code like this:

var oH = xfa.layout.h(txtDescription, "in");

this.h = oH + "in";

where txtDescription is the name of the field. You can put this code on the Layout Ready event of the field that needs to adjust size.

Make sense?



Level 5
It works fine, thanks.

The Layout Ready Event happends the first time the pdf is print and every time the layout is modify ?