These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

MANTATORY CHECKBOXES

patra
Registered: Oct 19 2006
Posts: 270

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

My Product Information:
LiveCycle Designer, Windows
patra
Registered: Oct 19 2006
Posts: 270
I found a solution and here it is in case someone else need it for their project:
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
formman
Registered: Jul 17 2008
Posts: 44
All,

Actually you can set a checkbox's Object Pallette/Value Tab/Type: = User Entered, Required.

All you have to do is to enter the following in the XML of the Checkbox object. I usually put it at the bottom the object XML just abover the ending tag.The code is:

When you turn on the Highlight fields the checkbox will display red borders. I will not vouch for any validations you do against this but it will display.

Rick Kuhlmann
Tech-Pro, Inc.

Forms Developer/Designer
Tech-Pro, Inc.
Roseville, MN

Ciupaz
Registered: Jan 29 2009
Posts: 75
Hi,
I have a similar problem.
I have 3 checkboxes and I need that 1 and *only one* of these is checked by the user.
How can I accomplish this?

Thanks a lot.

Luigi
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You can use radio buttons in an exclusion group.

George Kaiser

Ciupaz
Registered: Jan 29 2009
Posts: 75
gkaiseril wrote:
You can use radio buttons in an exclusion group.
Good idea.
They are in an exclusion group by default, or I have to set something?

Luigi