Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Hiding buttons when printing and adjusting field to compensate

Avatar

Level 4

Hi,

I had a request for a form in which the Add a Row button and Delete Row button are hidden when printed to make it look a little nicer.  I was able to hide the buttons when printing, but the table that the delete is part of still looks odd and there is a larger space than I'd like to have between the tables once the add a row doesn't show.  Is there are a way to make things look nicer?  I've attached the demo of the form I'm working on a sample of what it looks like right now when I print.

I did see a post about Hiding text field borders when printing and it sounded like I might need to do something similar, but I'm not quite sure what.

Thanks!

Image: https://acrobat.com/#d=HvU8V27oA*Ki6HzoI2Ec0w

Form: https://acrobat.com/#d=1K*EfksEnAH0azzxTrx31w

1 Accepted Solution

Avatar

Correct answer by
Level 10

Setting the cell colour to white should work, because you are repeating an instance of the row the white background should replicate as well.

You can also script it with: fieldName.border.fill.color.value = "255,255,255";

View solution in original post

7 Replies

Avatar

Level 10

The easiest way to deal with the buttons down the side is to set the borders of those cells to none, then you don't have to worry about it - you will end up with a little extra space down the right side but the table will look finished when the buttons hide. This is how I do it, because the button takes the whole space of the cell I just don't put a border on it. Getting into hiding columns and shifting table size to fill the space is getting pretty tricky.

To get the tables closer together when you print and hide the add row button, put the following script in the prePrint event of the button:

this.presence = "hidden";

And this script in the postPrint event:

this.presence = "visible";

Because the button is part of the flowed subform the table is in when you set its presence to hidden the subform will close the gap.

Avatar

Level 4

The hiding the buttons worked well, however I don't like how the ends of my tables look when I print.  I took the borders off, or so I thought, but they're still showing when I print, at least the out of the table border.  Is there something else I can do to tell it to not show formatting when printed?

Avatar

Level 10

Make sure you get rid of the borders around the cells and around the outside of the table - you should end up with nothing around the cells with the buttons.

Avatar

Level 4

But won't that take away borders that I do want or do I need to just go back and put borders on those cells individually?

Avatar

Level 10

The default table has borders on the cells and around the outside of the table, you can turn off the border on the table itself and you won't see anything different unless you've turned off borders on individual cells.

Avatar

Level 4

OK, so I'm getting closer.  The background fill from one of the tables is gray and so I have gray hanging off the edge of the table now.  Any thoughts?  Thanks!

Avatar

Correct answer by
Level 10

Setting the cell colour to white should work, because you are repeating an instance of the row the white background should replicate as well.

You can also script it with: fieldName.border.fill.color.value = "255,255,255";