wrote a script to check certain fields and they all work, but the SAVE does not work
Wrote up a quick script to check certain fields for when people fill out a form that would be either e-mailed to them or downloaded from a web page. I would like the file to be saved to their desktop so that they could later e-mail it to the appropriate people. All the fields are checked without a problem, just the save doesn't work 😞
Here is my script:
var error=false;
var message="You must enter a value for the following required fields:\r\n";
var b1=this.getField("Name");
var b2=this.getField("Address");
var b3=this.getField("City");
var b4=this.getField("Zip");
var b5=this.getField("E-Mail");
var b6=this.getField("Signature1");
var b7=this.getField("Signature2");
var b8=this.getField("Signature3");
if(b1==undefined || b1.value.length<1)
{
error=true;
message+="You must fill out Name before saving\r\n"
}
if(b2==undefined || b2.value.length<1)
{
error=true;
message+="You must fill out Address before saving\r\n"
}
if(b3==undefined || b3.value.length<1)
{
error=true;
message+="You must fill out City before saving\r\n"
}
if(b4==undefined || b4.value.length<1)
{
error=true;
message+="You must fill out Zip before saving\r\n"
}
if(b5==undefined || b5.value.length<1)
{
error=true;
message+="You must fill out E-Mail before saving\r\n"
}
if(b6==undefined || b6.value.length<1)
{
error=true;
message+="You must fill out SCAF COE Signature before saving\r\n"
}
if(b7==undefined || b7.value.length<1)
{
error=true;
message+="You must fill out CIF-SS Signature before saving\r\n"
}
if(b8==undefined || b8.value.length<1)
{
error=true;
message+="You must fill out CIF-LA Signature before saving\r\n"
}
if(!error)
{
this.save();
}
else
{
app.alert(message,3);
}
