Expand my Community achievements bar.

SOLVED

Attaching a file to a form...make attached file visible when opening a saved PDF form.

Avatar

Level 2

Hi,

In the GN (Government of Nunavut, Canada), they do not use the forms in the traditional way (i.e. using a Submit button and piping the XML data into an email attachment). They all have Acrobat Standard and save the entire form and then emailing it to the authority who has to send it to Operations, Project Office, etc.

When they attach a file, the attachment panel shows the attachment on the left. However, when they open the saved form, the attachment panel only opens when they click on the paper clip.

Question:

Is there a way to save the form so that the attachment panel always opens if there is a file attached? (I mean like on a regular PDF file where you can put the properties to open Page and Bookmark or Page and Page view.)

OR

Is there a way to show the attachment in the form of a thumbnail or icon beside the 'Attach File' button as soon as it is attached?

Thank you!

Lisa

821937_pastedImage_3.png

1 Accepted Solution

Avatar

Correct answer by
Level 10

You have to change the scripting language into JavaScript as your currently using FormCalc.

Select your button and change the language in the script editor,

View solution in original post

6 Replies

Avatar

Level 10

You can use a script in the forms docReady event to show the attachement pane.


if (event.target.dataObjects) {


  event.target.viewState = {overViewMode:7};


}


Avatar

Level 2

Thank you for the script. Unfortunately I am getting this error message:

I don't know why. Could you help again please?

I also attached the whole form (just in case).

Many thanks!

Lisa

Avatar

Level 10

Sorry, but what error message?

And if you like to share your form upload it somewhere and post a link here, thanks!

Avatar

Level 2

Sorry, I attached it in an e-mail responding to your email in the probst@bell.net inbox.

Here it is again:

823586_pastedImage_0.jpg

I also attached the whole form but cannot seem to do that here.
Thanks!

Lisa

Avatar

Correct answer by
Level 10

You have to change the scripting language into JavaScript as your currently using FormCalc.

Select your button and change the language in the script editor,

Avatar

Level 2

Hi Genius

Again, thank you very much!

It did not occur to me that I had the wrong language. I clicked Correct Answer.

At the risk of being too demanding, I have another question and will ask here so that I can attach the form. I would like to propagate the table rows to a new page and possibly clone the header row. Would something like (var i = 0; i < xfa.host.numPages; i++)? I don't know the syntax and what to do to pick up the table header.

Thanks!

Dumb