Okay,
Well I found out my term "VERIFY" should have been "VALIDATE" but I figured out the answer to question 2
If you are having the same issue please use the script below.
I created a plain button and added this script the the "click" event.
// This script performs a series of checks to verify that any required fields
// contain data. In this case, each field is individually checked to verify
// that the value of the field is non-null or an empty string. If the value
// of the field is null or an empty string, an alert message is displayed
// indicating that data must be input into the field and the background color
// of the fillable area is changed to red.
// Use this variable to indicate if a field does not contain data.
var iVar = 0;
if ((Name.rawValue == null) || (Name.rawValue == "")) {
app.alert("Please enter a value in the Name field.");
// Change the color of the fillable area of the text field.
xfa.resolveNode("Name.ui.#textEdit.border.edge").stroke = "solid";
xfa.resolveNode("Name.ui.#textEdit.border.fill.color").value = "255,100,50";
// Set the variable to indicate that this field does not contain data.
iVar = 1;
}
else {
// Reset the fillable area of the text field.
xfa.resolveNode("Name.ui.#textEdit.border.edge").stroke = "lowered";
xfa.resolveNode("Name.ui.#textEdit.border.fill.color").value = "255,255,255";
}
if ((Address.rawValue == null) || (Address.rawValue == "")) {
app.alert("Please enter a value in the Address field.");
// Change the color of the fillable area of the text field.
xfa.resolveNode("Address.ui.#textEdit.border.edge").stroke = "solid";
xfa.resolveNode("Address.ui.#textEdit.border.fill.color").value = "255,100,50";
// Set the variable to indicate that this field does not contain data.
iVar = 1;
}
else {
// Reset the fillable area of the text field.
xfa.resolveNode("Address.ui.#textEdit.border.edge").stroke = "lowered";
xfa.resolveNode("Address.ui.#textEdit.border.fill.color").value = "255,255,255";
}
if ((City.rawValue == null) || (City.rawValue == "")) {
app.alert("Please enter a value in the City field.");
// Change the color of the fillable area of the text field.
xfa.resolveNode("City.ui.#textEdit.border.edge").stroke = "solid";
xfa.resolveNode("City.ui.#textEdit.border.fill.color").value = "255,100,50";
// Set the variable to indicate that this field does not contain data.
iVar = 1;
}
else {
// Reset the fillable area of the text field.
xfa.resolveNode("City.ui.#textEdit.border.edge").stroke = "lowered";
xfa.resolveNode("City.ui.#textEdit.border.fill.color").value = "255,255,255";
}
if ((State.rawValue == null) || (State.rawValue == "")) {
app.alert("Please enter a value in the State field.");
// Change the color of the fillable area of the text field.
xfa.resolveNode("State.ui.#textEdit.border.edge").stroke = "solid";
xfa.resolveNode("State.ui.#textEdit.border.fill.color").value = "255,100,50";
// Set the variable to indicate that this field does not contain data.
iVar = 1;
}
else {
// Reset the fillable area of the text field.
xfa.resolveNode("State.ui.#textEdit.border.edge").stroke = "lowered";
xfa.resolveNode("State.ui.#textEdit.border.fill.color").value = "255,255,255";
}
if ((ZipCode.rawValue == null) || (ZipCode.rawValue == "")) {
app.alert("Please enter a value in the Zip Code field.");
// Change the color of the fillable area of the text field.
xfa.resolveNode("ZipCode.ui.#textEdit.border.edge").stroke = "solid";
xfa.resolveNode("ZipCode.ui.#textEdit.border.fill.color").value = "255,100,50";
// Set the variable to indicate that this field does not contain data.
iVar = 1;
}
else {
// Reset the fillable area of the text field.
xfa.resolveNode("ZipCode.ui.#textEdit.border.edge").stroke = "lowered";
xfa.resolveNode("ZipCode.ui.#textEdit.border.fill.color").value = "255,255,255";
}
if ((Country.rawValue == null) || (Country.rawValue == "")) {
app.alert("Please enter a value in the Country field.");
// Change the color of the fillable area of the text field.
xfa.resolveNode("Country.ui.#textEdit.border.edge").stroke = "solid";
xfa.resolveNode("Country.ui.#textEdit.border.fill.color").value = "255,100,50";
// Set the variable to indicate that this field does not contain data.
iVar = 1;
}
else {
// Reset the fillable area of the text field.
xfa.resolveNode("Country.ui.#textEdit.border.edge").stroke = "lowered";
xfa.resolveNode("Country.ui.#textEdit.border.fill.color").value = "255,255,255";
}
// If all of the required fields contain data, then the iVar variable is set to
// zero, and a confirmation message is displayed.
if (iVar == 0) {
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
}
This will validate the specified fields. I have not tested this on radio buttons or check boxes and I am sure something will have to be changed.
I am still looking for the answer to my first question and I will post here if i find it, if not and someone knows the answer please let me know.
Thanks again.