Justin,
There are several ways to approach this. In my example I added the following JavaScript on the change event of the RadioLocation radio button exclusion group. If the user selects 'No' (rawValue '2') I reset the drop-down list, in the event it contains a value, and I disable access to the drop down. If the user selects 'Yes' (rawValue '1'), I make the drop-down available (or "User Entered - Optional").
// form1.#subform[0].RadioLocation::change - (JavaScript, client)
if (RadioLocation.rawValue == "2") {
DropDownList2.rawValue = null;
DropDownList2.access = "protected";
}
else {
if (RadioLocation.rawValue == "1") {
DropDownList2.access = "";
}
}
On the drop-down list I add a script to check if the selection is null. If it is null and RadioLocation is 'Yes' (rawValue '1'), I put up a message box,
// form1.#subform[0].DropDownList2::exit - (JavaScript, client)
if (DropDownList2.isNull && RadioLocation.rawValue == "1") {
xfa.host.messageBox("If 'Other Locations' is 'Yes', please select the # of locations.");
}
Note. I you want to enforce the validation before printing or submitting you will need additional script against the applicable events.
Steve