Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Can I make an attach button that adds a description to the file it is attaching?

New Here ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

I have been tasked to create a fillable form that at the end of the form allows the user to attach their supporting documentation the the form via an attach button. Currently the attach button on the form allows the user to attach anything they want to the document "as is". Typically on this form the user will attach up to seven supporting documents.

 

I have been asked if I can alter the form with seven seperate attach buttons that when the user choses to attach that file, the button can be programmed to add a descriptor to file name or to just edit the description box for the file? Example of what I mean: if the user clicks on the "add map" button and uploads file "1155", is it possible to alter the file name through that attach button to make the file attached something like "1155-map" or "map" or change the description as I would if I were to right click the file in the attachment pane and type in "map" under "edit description"?

 

Appreciate your time.

TOPICS
Create PDFs, How to, PDF forms

Views

157

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 10, 2021 Jun 10, 2021

Copy link to clipboard

Copied

LATEST

You can't change the name of the attached file, but you can set its Description field to match it, or to be anything else.

In order to do that you need to add the comment using a script and then set its richContents property, as that's what is used for the Description field. For example:

 

 

var annot = this.addAnnot({
	page: 0,
	type: "FileAttachment",
	point: [400,500]
});
annot.richContents = [{text: "Map: " + annot.attachment.name}];

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines