Skip to main content
Nintex Community Menu Bar

How to Resize Panel dynamically when fields inside are set via javascript

  • September 2, 2016
  • 9 replies
  • 256 views

Forum|alt.badge.img+1

Hello,

I have a panel with label inside it which is supposed to display different messages based on other field selection on form. Although panel is set to resize automatically, when value of the label inside the panel is set via javascript, it shows scrollbar instead resizing to show whole message. Can anyone help me with this issue?

9 replies

Forum|alt.badge.img+14
  • Scholar
  • September 21, 2016

you can achieve that by a following call

NWF.FormFiller.Functions.ProcessFillerControl(NWF$('.theLabelClass'), NWF$('.formFillerDiv') ) 

Forum|alt.badge.img+1
  • Author
  • September 26, 2016

That was it. Thank you very much Marian.


Forum|alt.badge.img+7
  • March 31, 2017

Hi Marian,

How would I modify this to work in my scenario below. I can't seem to get the space to grow based on how big the table is in the multiple lines of text control.


Forum|alt.badge.img+14
  • Scholar
  • April 3, 2017

please post new question.

it's completelly diferent type of control, so it might need completelly different approach.

futhermore, afaik, multiline text control tends to show scrollbars in new/edit mode instead of resizing itself. so, I'm not sure whether it will be (easily) achievable.


Forum|alt.badge.img
  • Nintex Partner
  • July 26, 2017

Hi Marian, in my case I have two panels inside the inner panel I set a tables that built using javascript the number of table depend on the number of row in the repeating section. Where and how can I call this function to prevent scrollbar to appear when the number of tables become more than the height of the panel ?


Forum|alt.badge.img+14
  • Scholar
  • July 26, 2017

I'm sorry ‌ I do not follow your setup.

can you create new question and post some examples/screenshots?

what you mean with "tables"? is it repeating section? how "tables" are related to panels?

please explain all these in new question.


Forum|alt.badge.img
  • Nintex Partner
  • July 27, 2017

Thanks for your consideration.

Please find the attached picture that has a screenshot with explanation for my issue. I tried to set the height for the panel dynamically according to number of rows . I got the number of item in the collection variable then multiply this number with the height of table then set the height of panel according to that height like this :

var height = collVar.length ;

document.getElementsByClassName("PanelClass").style.height=Classheight+ 'px';

but this solution didn't work.

Thanks again.


Forum|alt.badge.img+1

i try this but not work for me.I have label which its value set by JavaScript on run-time and this label inside a panel which also auto resized 

NWF.FormFiller.Events.RegisterAfterReady(function () {NWF.FormFiller.Functions.ProcessFillerControl(NWF$('.attachmentField'), NWF$('.formFillerDiv') ) ;
});


Forum|alt.badge.img+14
  • Scholar
  • November 20, 2018