dynamically change controls width in table cell | Community
Skip to main content
Level 5
Sep 18, 2019 7:21 PM UTC
Solved

dynamically change controls width in table cell

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
eugzlAccepted solution
Level 5
Sep 20, 2019 2:02 PM UTC

The problem is solved

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

   txtField.presence = "visible";

   this.w = "0.5in";

   txtField.w = "1.8in";

   txtField.x = "0.49in";

}  

3 replies

eugzlAuthorAccepted solution
Level 5
Sep 20, 2019 2:02 PM UTC

The problem is solved

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

   txtField.presence = "visible";

   this.w = "0.5in";

   txtField.w = "1.8in";

   txtField.x = "0.49in";

}  

Translate
eugzlAuthor
Level 5
Sep 19, 2019 5:02 PM UTC

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.

Translate
Employee
Sep 19, 2019 12:28 AM UTC

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

Translate