I try to find a answer but still no solution...
I use LCD 8.0 and my users Reader to fill and print the form.
On the form there are 2 checkboxes(One is required).
How we can prevent printing if the user did not check one of the checkboxes and how we can warn them that there is a required checkbox before print?
There is a great post from Stefan Cameron about how to prevent printing with
text fields!
But how about checkboxes?
One more question: Why checkboxes not have User Entered Required option as other fields?
Thanks again
For the print button on click event:
if ((CB1.rawValue == "0") & (CB2.rawValue == "0" ))
{
{xfa.host.messageBox("At list one checkbox is required.", "Error Message", 3);}
A1.presence = "visible";
A2.presence = "visible";
}
else
{
A1.presence = "invisible";
A2.presence = "invisible";
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
}
CB1 & CB2 checkBoxes.
A1 & A2 are text boxes on top of the checkboxes with red borders invisible.For checkboxes(if only one much be checked) enter on click event:
For CB1:
if (this.rawValue ==1)
CB2.rawValue ="0";
For CB2:
if (this.rawValue ==1)
CB1.rawValue ="0";
THANKS