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.

Adjusting the height of multi line text field in dynamic sub forms

Avatar

Former Community Member
Hi!



I am just wondering how to handle the height of multi line text fields in the sub forms which have flow layouts.



Here is the scenario. I have two subforms - subform1 followed by subform 2 on the page, both have the flow layout. A text field 1 and 2 with the multi line properties enabled are embeded in subform 1 and 2 respectively.



The problem I am having here is when the height of text field grows due to the multiple lines in text field 1, subform1 doesn't know the height of the textfield. Thus it does not flow the contents of the text field 1 and let the contents of text field 1 to overflow onto the text field 2 of subform 2.



I can probably write a java script to calculate the height of the text field 1 when the height changes and change the height of subform 1 accordingly. But I don't want to do it that way. There should be some way or properties we could set in designer to handle this situation.



Any lights on that would be much appreciated.



Regards,

Lynn.
3 Replies

Avatar

Former Community Member
Lynn.



Were you ever able to solve your problem?



I have a textfield that i need to grow as the text grows.

I have a js that finds the line count and can adjust the height, but i am not sure how to adjust the height.



And ...



i am also wondering about the objects below the text field.

How do i get those to move down?



any help would be great.



thanks

david

Avatar

Former Community Member
If I'm understanding the problem correctly, you have a fixed position page which contain 2 flowed suforms each with one expandable field. Thus, when the first field expands, it overlaps the second field since the first subform grows but it does not push the second subform down to make room.



If that's the case, changing your page's content type to flowed should fix your problem.



Also, you won't be able to get the field/subform height on an object that grows dynamically since it's height is always set to 0 (I ran into that problem earlier this month...).

Avatar

Former Community Member
Ariane,



thanks for the reply.

yeah, i got that figured out. i was so focused on the scripting, that i completely missed the flow stuff in the layout.



have a good day.

david