Acrobat User Community Forums

You are not logged in.     Log in to your AUC account.     Don't have an account? Sign up today

#1 2007-10-29 16:58:03

brianscottoliver
Member
From: Washington DC
Registered: 2007-10-29
Posts: 1

"Attach files" button for form that works in Reader before submitting via "Submit" button

I would like to add a button to a form created in Livecycle that will allow my low/no tech end users to be able to press and attach files to the form even in Reader before the form is submitted via the "Submit by E-mail" button. Any suggestions, previous post answering this question is missing the instructions link


My Product Information:
LiveCycle Designer Pro 8 / Windows

Offline

 

#2 2007-10-29 23:21:51

thomp
Member

Registered: 2007-04-23
Posts: 1002

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

For an XFA Form this can only be done with the "doc.importDataobject()" function.  Look it up in the Acrobat JavaScript Reference.  There are some restrictions.  For example, Reader cannot embed a file into a PDF, unless the file has "Embedding Rights".  Embedding rights are only available through the Live Cycle Rights Enabling Server.

Also, from the XFA JavaScript context, the "Doc" object is acquired with "event.target", so the code in the button's click event would look somthing like this.

event.target.importDataObject({cName:"theName"});

Offline

 

#3 2007-11-30 12:59:03

excelgeek
Member
Registered: 2007-11-03
Posts: 7

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

How would you do this using a submit button using the PDF Format instead of using FDF? Plus doing it in Acrobat 8.0 pro instead of LiveCycle?

Offline

 

#4 2007-12-02 19:14:31

thomp
Member

Registered: 2007-04-23
Posts: 1002

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

There is a mechisim for this in regular PDF submissions.  In fact it's been around for quite a while. 

1. Add a text field to a PDF. 
2. Name it "SubmitFiles"
2. Set the "Field is used for file selection" Option
3. Add this script to a mouse down action on the field, or to the submit button, just make sure that the script is called before the submit happens.

Code:

var f = this.getField("SubmitFiles");
f.browseForFileToSubmit();

Offline

 

#5 2008-02-24 22:08:40

grandxprix
Member
Registered: 2007-11-15
Posts: 11

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

For Pdf Pro-----End users attaching a file to a pdf via submit, does the submit button function have to email submit or can it be a web submit

Offline

 

#6 2008-09-02 10:23:30

GWilson53
Member
Registered: 2008-09-02
Posts: 5

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

I am a new user of adobe tools.  I am using Acrobat 8 Pro. I orignally designed the form using LiveCycle Designer but discovered that it would not work in my environment (users with Reader need to use my form).
Redisigned the form in Acrobat 8 Pro.  I have it working with the exception of the file attachment process.  I used your suggestion to use a text file  that had been 'set for file seletion' and the script for browseForFileToSubmit(). When I click in the field, I get the expected file selection box. I select the file I want and the file selection box goes away (as expected).  The text field associated with this script remains empty until I remove focus from it (i.e. click on another field). I can deal with this but the bigger problem is that I do not have the file attached to the pdf when I press the submit button later in the process. The submit button is an email submit and works fine to send the pdf form (but there is no attachment). It will not even work when I fill the form in using Acrobat 8 Pro.
Any ideas about what I am doing wrong?
Thanks

Offline

 

#7 2008-09-16 16:18:09

HDana
Member
Registered: 2008-01-24
Posts: 33

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

When searching forums, make sure you're in the correct forum. This is a LIVECYCLE forum so I expect to read LIVECYCLE answers...otherwise, reading this can be very confusing.

If you want your Reader users to use your LIVECYCLE form, enable usage rights with Acrobat Pro.

Last edited by HDana (2008-09-16 16:20:10)

Offline

 

#8 2008-09-18 15:24:19

dk3dknight
Member
From: Texas
Registered: 2008-01-22
Posts: 56

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

Small question why did adobe reader have a issue with you not being able to use livecycle?

"Advanced-> Enable Use age Rights in Adobe Reader"

or were the users stuck in some extrelly low version of reader?

Just curious.

GWilson53 wrote:

I am a new user of adobe tools.  I am using Acrobat 8 Pro. I orignally designed the form using LiveCycle Designer but discovered that it would not work in my environment (users with Reader need to use my form).
Redisigned the form in Acrobat 8 Pro.  I have it working with the exception of the file attachment process.  I used your suggestion to use a text file  that had been 'set for file seletion' and the script for browseForFileToSubmit(). When I click in the field, I get the expected file selection box. I select the file I want and the file selection box goes away (as expected).  The text field associated with this script remains empty until I remove focus from it (i.e. click on another field). I can deal with this but the bigger problem is that I do not have the file attached to the pdf when I press the submit button later in the process. The submit button is an email submit and works fine to send the pdf form (but there is no attachment). It will not even work when I fill the form in using Acrobat 8 Pro.
Any ideas about what I am doing wrong?
Thanks


A true warrior would have asked what that little red  button does.

Offline

 

#9 2008-09-26 11:16:58

mbrady
Member
Registered: 2008-09-26
Posts: 1

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

I designed a form using Acrobat 8 Professional. I followed the instruction on creating a text field. Unfortunately, the "Field is used for file selection" option is grayed out. How do I enable this option?

Thanks for your help.

Offline

 

#10 2008-09-26 11:56:48

dk3dknight
Member
From: Texas
Registered: 2008-01-22
Posts: 56

Re: "Attach files" button for form that works in Reader before submitting via "Submit" button

mbrady wrote:

I designed a form using Acrobat 8 Professional. I followed the instruction on creating a text field. Unfortunately, the "Field is used for file selection" option is grayed out. How do I enable this option?

Thanks for your help.

Im sorry mbrady, um you posted in the wrong forum.  This is for LiveCycle not adobe Acrobat, they create forms differently and have different user interfaces.

This is a link to the forums dealing with forms created in Adobe Acrobat.
http://www.acrobatusers.com/forums/aucb … .php?id=22

I fear that the differences between the two programs will only waste your time with incorrect or invalid answers.

Have a nice day :)


A true warrior would have asked what that little red  button does.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

AcrobatUsers.com  >>  User Groups • News • Events • Articles • Blogs • How To • Resources • Member Log in