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

Acrobat 9 to Livecycle Problem

MFARRELL
Registered: Aug 17 2010
Posts: 17
Answered

if(event.value == "MARRIED")
{
this.getField("SPOUSE").required = true
this.getField("SPOUSE SSN").required = true;
}
else
{
this.getField("SPOUSE").required = false
this.getField("SPOUSE SSN").required = false;
}

This was my Acrobat 9 validation script. I need to switch this to LC Designer. I have the first if part right. I change it to:

if(this.rawValue == "Married")

I cannot seem to get the required part right. This script is suppose to take a Dropdown lists value(the Married) and make 2 other fields required if "Married" selected and not required if something else is selected.

Bamboolian
Registered: Jul 27 2010
Posts: 48
Hi,

to change the field to required, use the property ".mandatory", and also change the method referring the field from "this.getField" to "xfa.resolveNode".

// Change field to required fieldxfa.resolveNode("SPOUSE").mandatory = "error"; // Change field to optional fieldxfa.resolveNode("SPOUSE").mandatory = "disabled";