cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a print condition?

Former Member
0 Kudos

Hi community

I have the following requirement: I want the user to fill a required field, if the field is not being filled, I want to restrict the printing of the fom. Once filled, the user is allowed to print the form. How can I achieve that?

Thanks in advance, Points will be rewarded.

Accepted Solutions (0)

Answers (2)

Answers (2)

vaibhav_tiwari
Contributor
0 Kudos

Hi Alexander,

I tried my best but could not come up with a proper solution to your problem except the following script which works fine with limitation that the form will be printed with no characters on it.

if( TextField1.rawValue == null)
{
	xfa.host.messageBox("Please fill in all the required fields");
	xfa.host.setFocus("TextField1");
	form1.relevant = "-print";
}

Put it in the prePrint event of form1 which will be there top in the hierarchy.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Question is still unaswered...