Instead of wasting more time on the Script issue I decided to look into the printing of forms and found that it's another PAIN-IN-THE-NECK with my v16 Advanced!
Initially, the fields' borders won't print and I have to superimpose borders over the fields to get them printed. I then read about unchecking "Delineate fields on.." in Layout setup by a member, and I did just that to get the fields' borders printed.
Then after spending another some hours adjusting the margins to get all form contents within the A4 size printed, I discovered another issue.
This time I found that some letters and words from fields' checkbox labels NOT printed!
Please refer to screenshots below. The left side shows what is visible on Browse and Preview modes which are what they should be.
The right side shows what actually got printed with missing letters and words in many field checkbox labels circled in pink.
Wonder if it has anything to do with the Layout Theme selection as someone in another post suggested on an issue about the Unprinted borders. I use the default "Enlightened" theme.
Can't afford the time to try with several other themes. Has anyone encountered similar issues and how did you resolve it?
Thanks very much!