Kevin,
Given a form with the root 'form1', a subform called 'subform1', and four checkboxes called 'lateral', 'main', 'inlet', and 'other', you could run a script on the change event of each checkbox to compare the current checkbox with all the others. For example,
form1.subform1.lateral::change - (JavaScript, client)
if (form1.subform1.lateral.rawValue == "0") {
if (form1.subform1.main.rawValue == "0" && form1.subform1.inlet.rawValue == "0" && form1.subform1.other.rawValue == "0") {
// xfa.host.messageBox("Please select a minimum of one option.","Options",1);
form1.subform1.other.rawValue = "1";
}
}
form1.subform1.main::change - (JavaScript, client)
if (form1.subform1.main.rawValue == "0") {
if (form1.subform1.lateral.rawValue == "0" && form1.subform1.inlet.rawValue == "0" && form1.subform1.other.rawValue == "0") {
// xfa.host.messageBox("Please select a minimum of one option.","Options",1);
form1.subform1.other.rawValue = "1";
}
}
form1.subform1.inlet::change - (JavaScript, client)
if (form1.subform1.inlet.rawValue == "0") {
if (form1.subform1.lateral.rawValue == "0" && form1.subform1.main.rawValue == "0" && form1.subform1.other.rawValue == "0") {
// xfa.host.messageBox("Please select a minimum of one option.","Options",1);
form1.subform1.other.rawValue = "1";
}
}
form1.subform1.other::change - (JavaScript, client)
if (form1.subform1.other.rawValue == "0") {
if (form1.subform1.lateral.rawValue == "0" && form1.subform1.main.rawValue == "0" && form1.subform1.inlet.rawValue == "0") {
// xfa.host.messageBox("Please select a minimum of one option.","Options",1);
form1.subform1.other.rawValue = "1";
}
}
This will force 'other' to be selected. Of course, if a user doesn't click any checkbox than you will have to put additional logic to validate prior to printing, saving, submitting, or whatever action signifies form fill completion.
Steve