Quantcast
Channel: SCN : Discussion List - SAP Interactive Forms by Adobe
Viewing all articles
Browse latest Browse all 1237

Reg: Deselect/UnFocus on field

$
0
0

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


Viewing all articles
Browse latest Browse all 1237

Trending Articles