Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

File Upload field in livecycle designer

Avatar

Level 2

Hi

Am trying to create a form which allow user to add an attachment and want to display the size of the attached field.And also i wnt to save the form in the local system .Could anyone help me to come out of this.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I modified one of my samples to show you....

Paul

View solution in original post

25 Replies

Avatar

Former Community Member

The dataobject has a size attribute that will return the size of the attachment in bytes. You use it the same way you used the path attribute to get the filename.

Saving of the attachment on the localsystem is done through he exportDataObject method. You will not be able to save the attachment without th euser intervening. Meaning that the fil dialog will come up and the user must hit enetr on the dialog to complete the save.

Paul

Avatar

Level 2

Hi paul

   Thanks for ur reply.Am new to this.Can u please send me any sample

Avatar

Correct answer by
Former Community Member

I modified one of my samples to show you....

Paul

Avatar

Level 2

Thanks a lot Paul.

Am trying to create a form which has two check boxes (ch1,ch2)  and two radio buttons(male,female).If user click a male , a value in ch1, ch2 values generated according to tat.try to help me to come out of this Paul.

Avatar

Level 1

I'm creating a fillable form in LifeCycle Designer ES 8.2 and i'm trying to give the option to attach

a file if the user wants to. Also, when the form has been filled out, it is emailed to a group of people

and i need the attachment to be emailed along with the completed form. Can this be done?

Avatar

Level 1

I'm creating a fillable form in LifeCycle Designer ES 8.2 and i'm trying to give the option to attach

a file if the user wants to. Also, when the form has been filled out, it is emailed to a group of people

and i need the attachment to be emailed along with the completed form. Can this be done?

Avatar

Former Community Member

Yes you can add attachments to the PDF ......but if your users are using Reader then the form must be Reader Extended to allow for this functionality. You would need LiveCycle Reader Extensions server to do this. If they are using Acrobat then the attachments will work without an additional software.

paul

Avatar

Level 1

How would I go about putting the attachment option on the form? Would I just use a regular button?

What would the code look like to browse to find an attachment?

Avatar

Level 1

Using your sample, I can add a file, but when I save, close, and open the sample, the file is no longer in the box.  It is now in the attachments area.  Is there any way to make it populate the box with what is in the attachments area?  I am just thinking that the attachments area isn't the most user friendly place to store stuff because the average end user isn't going to know about it or how to get there/know that something is there. That's why I want the attachments to appear in the box when they open the form I'm building.

Thank you in advance.

Jesse

Avatar

Former Community Member

The form does not save the "state" of the form automatically. If you open the form in Designer and under the File/Form Properties/Defaults tab there is a "Preserve scripting changes to form when saved" radiobutton that needs to be set to automatically instead of manually.

Paul

Avatar

Former Community Member

Hi,

I really appreciate the example you provided, but I have a couple of questions...

  1. It seems unnecessary to have the "Show Attachment Names + Launch/Size" button visible. Isn't it redundant or does it serve a different purpose than I am realizing? Can I "hide" it without breaking anything?
  2. Is there supposed to be a Warning (as shown below) when you are removing a file? I'm afraid it might make the form users panic that they did something wrong, and they will all be asking me what to do.

Capture-2.GIF

Regards,

ZeroZone

Avatar

Former Community Member

I think I've figured out how to remove the warning, but I am now having another problem.

I opened my form in Acrobat X Pro, and extended Adobe Reader usage rights. Then when I open the PDF in Adobe Reader to test, my "Add File" button does not work. Any ideas?

Also, I don't know if this as anything to do with it, but I've hidden the "Show Attachment Names + Launch/Size" button.

Regards,

ZeroZone

Avatar

Former Community Member

I think I've figured out how to remove the warning, but I am now having another problem.

I  opened my form in Acrobat X Pro, and extended Adobe Reader usage  rights. Then when I open the PDF in Adobe Reader to test, my "Add File"  button does not work. Any ideas?

Also, I don't know if this as anything to do with it, but I've hidden the "Show Attachment Names + Launch/Size" button.

Regards,

ZeroZone

Avatar

Level 10

Hi,

Where a form is Reader Enabled in Acrobat, then the ability to attach other documents is restricted/not allowed:

options.png

The ability to attach documents is ONLY available if the user has Acrobat OR if the form has been Reader Enabled in the full LC Reader Extensions ES2.5.

See here: http://assure.ly/etkFNU.

Hope that helps,

Niall

Avatar

Level 4

Hi,

       I order to provide the Adobe Reader the capabilities of submission, we must provide Reader Extensions to the Dynamic PDF that we have. For this you need to go to Reader Extensions console, which is accessible through URL and it should of format,

http://<yourservername>:[port number]/ReaderExtensions

Please find image for below for more information, where you are adding capabilities for submission and attachments.

reimage.jpg

I hope this should answer to your question.

Thanks,

Rajesh

Avatar

Former Community Member

Thanks, Niall.

I was unaware of those options. I'm looking into it.

ZeroZone

Avatar

Former Community Member

Can Adobe Reader users still view, open, and save attachments, even though they cannot add them? If they submit the form to someone else, will the attachments still be there?

ZeroZone

Avatar

Level 10

Hi,

Doing a quick test with Paul's form above, yes, if the person with Acrobat attaches the files to the form, then the user with Reader will be able to see the files in the attachment panel and can open them.

However the user with Reader will only be able to save the data if each of the files is Reader Enabled to permit the save functionality for that form.

In particular the main form that contains the attachments would also need to be Reader Enabled.

Make sense?

Niall

Avatar

Former Community Member

Yes. However, I presume that most other file types (other than PDF) will not be an issue?

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----