Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

dynamically change controls width in table cell

Avatar

Level 5

Hi All.

I have dropdownlist and text field in one table cell. And I would like when dropdownlist has value "Other" the Text Field width will increase and dropdownlist width will decrease. The table cell size will keep unchangeable. If is that possible how to do that?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 5

The problem is solved

if(xfa.event.newText == "Other") {

   txtField.presence = "visible";

   this.w = "0.5in";

   txtField.w = "1.8in";

   txtField.x = "0.49in";

}  

View solution in original post

3 Replies

Avatar

Employee Advisor

Try to find the OOTB css/js applied on the textfield form [1] and you can overlay based on your requirement.

[1] /libs/granite/ui/components/coral/foundation/form/textfield/render.jsp

Avatar

Level 5

Hi JaideerBrar. Thanks for replay.

I not familiar with OOTB css/js. I will appreciate if you help by code and explain what need to do.

Thanks.

Avatar

Correct answer by
Level 5

The problem is solved

if(xfa.event.newText == "Other") {

   txtField.presence = "visible";

   this.w = "0.5in";

   txtField.w = "1.8in";

   txtField.x = "0.49in";

}