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.

Can you script a button to both add an image file as an attachment and display in an imagefield at the same time?

Avatar

Level 2

I'm creating a employee profile form where the user needs to add there photo and have it displayed on the form. Easy peasy so far. I also need to be able to get the images out once the form is submitted without loosing quality so I think file attachment is the way to go. How do I insert and attach an image file at the same time the user doesn't have "do the same thing twice"?

3 Replies

Avatar

Level 1

I work more with Adobe Flash Pro and the solution there would be to create two functions, or perhaps one function that does two things.  If you name the function myFunc() then have the event listener in Live Cycle for the button call that single function that does two things.  Or have it call each individual function separately as a third function which is called when the button is pressed.  You would, in that case be calling the two functions from within the third function.

I will have to investigate LC documentation further to help you more, if possible.  Does LC use JavaScript or some other language?

Avatar

Level 1

There's also this thread which popped up in my results on these forums:

https://forums.adobe.com/message/3422443#3422443

Avatar

Level 2

Livecycle does use javascript. I'm working on this today so I'll update my progress and post sample scripts.