Expand my Community achievements bar.

SOLVED

Locking an object to the bottom of the page

Avatar

Level 2

Hello,

I have created a layout that has a table within a subform in the main section of the layout. This table will load entries and expand based on how many entries are found. There is then a signature section located under the table subform. If too many entries are found everything will push to the next page. This is how I want it to work.

The problem that I am having is if there are only a few entries into the table the signature section will push up right under the table section, instead of being located at the bottom of the layout. I have tried to change the table subform to not be auto-fit, and to specify a size. That looks fine, until there are enough entries so that it should push to the next page, and instead will write on top of the signature section, and no additional page is created.

The ideal solution would be that I have the signature section at the bottom of the page, and if too many table entries are displayed it will start the next page with the remaining table entries, and the signature section would be located on the bottom of that next page.

Any suggestions? Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Thank you all for the suggestions. They were all helpful for me to get to my solution.  The way I solved it is by,

Creating my signature section as a footer on a Master page.

I made sure the have the different subforms of my footer all within one main subform.

then I added the following FormCalc code into the Initialize instance of my main footer subform,

var curp        = $layout.page  ( ref ( $ ) ) 

var totalp  = $layout.pageCount() 

if ( curp  ne totalp ) then 

$.presence = "hidden" 

endif

This setup displayed my footer only on the last page.

View solution in original post

5 Replies

Avatar

Level 10

Hi,

Maybe this post by John Brinkman will help, Transpromo: the sequel .

It explains how to position some content (in his case an advertisement) at a particular place in the form.

Avatar

Level 7

I wanted this as well and did some 'out of the box' thinking which works perfectly.

The basic thought is that I have a table you can see that you can add and remove rows but also have an invisible spacer table and then another table with the signature in it at the bottom.

You need to do some testing to find it's position, but basically when the form is loaded the visible table has one row and the spacer table has 10 rows (or whatever you need to make it push the signature table to the bottom where you want it.

When you click on the visible table button to add a row, at the same time it removes a row from the spacer table.

When you click on the visible table button to remove a row, at the same time it adds a row from the spacer table.

NOTE: Code order is important or it wont work. Add the row first and then remove the row.

I think this is quite nice way to achieve this.

Example: In my code template, i have made the invisible table not invisible so that i can see what it does. When i click the + button to add a row at the top, it removes from the invisible table and the footer stays where it is. You will just need to adjust row heights etc to make it fit how you like. I would attach it if i could.

1298432_pastedImage_1.png

Avatar

Level 2

Thank  for that suggestion. The design actually does not have the users inputting data. It is actually a table that is populated from our Customer Data. So if it finds 4 entries it will populate all four. The table breaks them down into 2 columns. Basically I want the Signature section to be a footer on the page. If there are enough entries to push down to the footer, it will push the footer and the remaining entries to the next page. I would still want the signature section to be the footer on the next page though.

Thanks,

Avatar

Level 7

You could put a signature footer on a master page and adjust the content area to suit, but if you go over a page, the signature footer would remain on the page that is associated with that master page.

Not sure if there is code you can write to change the master page depending on how many pages there are in the form or if that is even possible

.

Avatar

Correct answer by
Level 2

Thank you all for the suggestions. They were all helpful for me to get to my solution.  The way I solved it is by,

Creating my signature section as a footer on a Master page.

I made sure the have the different subforms of my footer all within one main subform.

then I added the following FormCalc code into the Initialize instance of my main footer subform,

var curp        = $layout.page  ( ref ( $ ) ) 

var totalp  = $layout.pageCount() 

if ( curp  ne totalp ) then 

$.presence = "hidden" 

endif

This setup displayed my footer only on the last page.