Hello Guru's,
I have a requirement to restrict the file types when adding attachment in Adobe Interactive Form.
Below is the code I have in Validate Event:
It is setting focus when adding document which is not PDF, but when I correct it and give a valid PDF document the focus is still on the field.
Please help me to remove the focus when I attach a PDF file.
if( this.rawValue == null )
{
}
else{ var fileName = this.rawValue;
var ext = fileName.substr(fileName.lastIndexOf('.')+1);
if(ext == "PDF" || ext == "pdf")
{
}
else
{
app.alert("Please select a valid PDF file");
FilePath.validate.nullTest = "error";
xfa.host.setFocus("InteractiveForm.SubForm.row_3.FilePath");
}
}
Thanks,
Pramod