Expand my Community achievements bar.

How to make a subform not print if the fields are empty

Avatar

Former Community Member

I'm once again working on that kind of client form where our agents fill in a bunch of fields on our forms and I only want those fields that are pertinent to that client to print out and I've grouped the fields that go together into separate subforms.

There are date fields and currency fields that relayout to floating fields in hidden blocks of text that appear when the last text field is exited, ie:

Subform1  "On 5/14/12 your application was approved. We will pay $100 to your account"

Subform2  "On 5/14/12 we received your application. We will need further information before you claim for $250 can be approved" etc. Obviously, both of these subforms cannot appear on the letter.

Jono gave me a great solution for not printing checkboxes that are not checked with a preprint script which worked perfectly and I tried to adapt that to the subforms but alas my skills are lacking. I tried just putting it in each fill in field but then the blocks of text still remained.

So basically I don't want the subforms that have empty fields to print.

I'd appreciate any help that can be offered.

2 Replies

Avatar

Level 10

Hi,

I think that the logic/script should be placed in the area where the user either approves or rejects the claim. This would avoid a prePrint script to check if fields are empty or not.

If you are stuck with checking if fields are empty on prePrint, then you would just need to check the relevant fields one at a time or use a loop.

Hope that helps,

Niall