I have a possibly complex situation. I have a large form divided into about 5 sections. Each section has expanding text fields and information panels. The information panels are there to help the user fill out each field with appropriate information, however, when the form is printed the info panels are set to disappear. This all works fine as it should do.
However, the client has had feedback and sometimes they want to print out single sections. What they have been doing is noting down the page numbers then sending to print only the pages they need. However, this isn't working well enough as once the info panels disappear (which is done automatically) the page numbers no longer coincide with what is being printed.
My solution would be to have a button for each section which would print a span of pages from the start of one field/section to the end of another field/section. Bearing in mind that these points aren't going to be on the same page for each of the filled forms is there a way of doing this?
Apologies here, but in terms of programming I'm a beginner, but hopefully a quick study!
Okay, so after some research I can see that the reason why it's not working is because the functions are working asynchronously ... so irrespective of the order, they all work pretty much at the same time. Problem is, I'm not sure about how to go about splitting them into two sections (hide the info panels FOLLOWED BY printing the section). I think I may need a set time out or a callback function. Can anyone help?
Throughout a section I have info boxes - these are text boxes wrapped in a subform called info1a, info1b etc. which are set to be hidden pre print - and post print they are set to visible. This works in itself.
However the code above still counts the page numbers within the section prior to the info boxes being hidden - in other words, the info boxes cause the pages to be printed to extend beyond the section as if the info boxes were still there, even though they are not.
If I have two buttons - one to set the visibility of the info boxes to hidden and then click another button to print the section then it works fine, but I can't amalgamate the instructions into one single button.