I have a table set to hidden and want to unhide it using a button and to hide it using the same button. If the table is left visible I don't want it to be able to be printe. Any suggestions?
thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Alright, seems like it does not keep the flow of the form...
Another work around you can use that will work for sure would be the following:
1. Keep this code in the button click event
2. In your hierarchy, click on the table you want to hide when printing, go in the prePrint event and put this line (prePrint is before printing)
3. Now in the postPrint event you can put the following line to put back the table visible (postPrint is after printing)
Keep in mind that if the Table is hidden when printing, the table will appear in the postPrint.
So if you want to avoid this, you can have a hidden text field that keeps in memory how you should display the table after printing.
If you do this, you can change the value "visible" for TextField1.rawValue
You can put the text field's value using the button click event, when changing the presence value of the table change the text field's value as well
Hope this will help!
Views
Replies
Total Likes
Hi there,
in the button click's event you would have have something written like the following :
Make sure to put this in a JavaScript event
Hope this Help!
Views
Replies
Total Likes
Works great except when I print it leaves a gap where the table was. I have the table default as hidden (exclude from layout).
thanks for your assistance so far.
Views
Replies
Total Likes
Make sure your content's parents are all flowable
Views
Replies
Total Likes
Every thing is flowed, all fields except the table are in flow able sub forms, and everything is enclosed in 1 flowable sub form.
am I able to send you a copy of the form?
Views
Replies
Total Likes
Alright, seems like it does not keep the flow of the form...
Another work around you can use that will work for sure would be the following:
1. Keep this code in the button click event
2. In your hierarchy, click on the table you want to hide when printing, go in the prePrint event and put this line (prePrint is before printing)
3. Now in the postPrint event you can put the following line to put back the table visible (postPrint is after printing)
Keep in mind that if the Table is hidden when printing, the table will appear in the postPrint.
So if you want to avoid this, you can have a hidden text field that keeps in memory how you should display the table after printing.
If you do this, you can change the value "visible" for TextField1.rawValue
You can put the text field's value using the button click event, when changing the presence value of the table change the text field's value as well
Hope this will help!
Views
Replies
Total Likes
Brilliant, works perfectly, thanks very much for the help
Pete
Views
Replies
Total Likes
Views
Likes
Replies