Limiting Dynamic Field expansion

radugbhr

12-03-2015

This has been asked, but never answered.

Is there a way to limit a field set to "expand to fit" from expanding beyond a certain boundary?  Be it a subform, neighboring field, etc. that can be set with a respect this fields space script?  Point being, I don't want a field to expand its height so much that it overlaps a text field far below it.

Accepted Solutions (0)

Answers (3)

Answers (3)

mouslander

14-03-2015

You can set the maxH to prevent the field from growing beyond the set limit i.e. 3in, or 5in. maxH does not set the initial height that can be anything you want it to be. The only issue is that the field will be limited to whatever you set it for but the text can scroll beyond the set limit. To prevent this I would recommend setting Limit Length to visible area. you will have to turn off expand to fit for the height which is weird but in my initial test it works properly. The field will grow, and stop at the set limitation and will not scroll beyond the visible size of the field.

radugbhr

13-03-2015

You are correct.  This is in a table.  I set the table to expand its height to fit depending on what is typed into the text field #2 (it's a single column with 5 rows, a text field for each row).  Text field 2 is the only one set to expand to fit for it's height.  But I also have a static text box below it that I don't want the table overlapping.

Because of what the type of form is, I don't want to set the table's (or text field's) max height right from the get go, so that rules out an Initialize event.  Will the TextField2.maxH = "3in"; script work on a change event?

mouslander

12-03-2015

Hi Radugbhr-

It sounds like  you have not set your fields to expand and flow so that when the field that is set to expand does while other fields below move with that field and do not overlap. If you do not want that type of dynamic event then you can set the max height of a field so that it cannot go beyond the limitation you set. The JS for that is: TextField1.maxH = "3in";