on 05-05-2008 6:08 PM
I have a comment text field on my form with a browser button beside it. If the comment is too long the user should be able to attach it as a file. So when I click on the browser button, an open file window should appear, just as like when you choose Open in My Computer.
Is this possible within a form, and how?
Thanks , Peter
Hi,
here is another way:
try
{
app.execMenuItem("AddFileAttachment");
}
catch(e)
{
xfa.host.messageBox("Cannot add an attachment: " + e);
}
Please note: You have to configure the ADS with "ReaderRights". Otherwise the file-open dialog will never appear.
Take care,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, just use this code snippet:
//predefine the file identifying name local to this instance of
//the form. May have to increment the number to keep it unique and
//to attach more files. This is not the same name of the file
//that you selected in the dialog box
var theIndex = this.parent.index;
var selectFileName = "Attachment " + this.resolveNode("username").dataNode.value; // theIndex; //+
var doc = event.target;
doc.importDataObject(selectFileName); //opens the windows dialog box
var selectedFile = doc.getDataObject(selectFileName);
var filename = selectedFile.path;
// set the filename
this.resolveNode("attachment").dataNode.value = filename;
Take care,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi peter,
There is attach file option available with interactive form. If you are using adobe reader 8.0 then you can see attach button at below left. Using this you can attach as many files as you want to adobe form. The attached files will move with the form.
Hope it will help.
Regards,
Vaibhav Tiwari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
11 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.