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.

RE: Text field set to expand

Avatar

Level 4

Good day everyone,

 

I've got a small question about expandable text field. Right now they work great, i set to "Multiple lines" and then set the box to auto expand. up to here all good.

 

And in order to see this happen, you type in a ton of txt inside the txtbox and when you click out, it expands to the right size. super!!!

The client was wondering if the auto-expand functionality could be done as they type in the text? So they type n type, and once the text reaches the box limit, it would simply expand by another row and would keep doing that until their done and leave the box.

 

Is that doable at all??

 

Thx again

 

PAtrick

 

4 Replies

Avatar

Community Advisor

Try to call layout-ready event on field change event. 
xfa.layout.relayout() in change event 

Avatar

Level 4

Tried it but i still get the arrows until i click out, then it expands to the right size.

I was just curious to see if we can expand as needed

 

 

Avatar

Level 10

Don't call the relayout() method from a change event. Your form can become unusable slow then. The relayout takes place, once the rawValue is set to a field which happens when you exit it. XFA forms are not designed to expand fields while typing.