Expand my Community achievements bar.

Stop Page Breaks / Flowing to next page

Avatar

Former Community Member
Hello,



A page of my form has a positioned subform. Within that subform is a flowed subform. Within that are 5 flowed subforms.



I need the 5 flowed subforms to expand/flow as needed but NOT beyond the page they are on.



Fiddling with the page breaks on various subforms allows the content to break to the next page or flow off the page into nowhere but I want it to simply stop flowing when the bottom margin is reached. No more content can be added unless you remove some.



Anyone?
4 Replies

Avatar

Former Community Member
All subforms have "allow page breaks within content" unchecked?

Maybe try to restrict the page occurrence in the masterpage tab to max 1



a funny workaround would be to use a monospaced (fixed-pitch) font like courier and limit the number of chars.

Avatar

Former Community Member
The product will not do this automatically. When you set something to flowed it will flow ...even beyond the page boundry. That is why there is a page break setting.



To do what you want you coudl check the position of the last subform and see if there is enough space to the end of the page to add a new one. If there is ...add it ...if not ...put up a message.



You will need to know the height of the subform you want to add.

Avatar

Former Community Member
Paul's idea may work, but I know in the past I've had issues retrieving the height of a flowable subform at runtime. Every time I've tried to get the dynamic height of a flowable subform, it ends up coming back null. If anyone finds a solution to this please post it. This would be very helpful to know.



Thanks!



Ryan D. Lunka

Cardinal Solutions Group

rlunka@cardinalsolutions.com

Avatar

Former Community Member
You have to query the layout Dom ...



xfa.layout.h(ObjectName, "units");



for example:



var oH = xfa.layout.h(txtDescription, "in");