Copy link to clipboard
Copied
Is there a way to do insert a form field into an AcroForm that allow Reader users to browse and insert a picture into that form field?
I know that LiveCycle can do this, but I need to do this using an AcroForm. Or maybe there's a third-party plug-in that can be used in an AcroForm to do this?
Copy link to clipboard
Copied
No, you don't need Acrobat 11 to create a form that uses this method, but your Reader users will need to upgrade. I don't see that they've announce the release date for Reader yet, but in the past it has usually been within about a month of the announcement.
Copy link to clipboard
Copied
Thank you very very much for your prompt reply
Kind regards
Gino
Copy link to clipboard
Copied
Hi guys,
I have managed to do the event.target.buttonImportIcon(); procedure successfully, but I actually need two boxes for photo input on the same page. When I click on the second box and browse the photo I want, it changes the photo on the first box too!
Any smart to fix this?
Thanks
Copy link to clipboard
Copied
@leority - that's because the fields are named the same. In Acrobat, any field named the same will have the same data mapped to them.
Easy fix: When in Edit mode, double click one of the fields to bring up Properties. On General tab, type a different Name in the field. Close edit mode. Test.
Note, the script is the same for both photo fields...just the names should be different.
Cheers!
Copy link to clipboard
Copied
Interestingly I didn't have the same names on both boxes. But I created 2 new boxes (beside each other) just for testing. Tested both and they accepted the 2 different pictures. Then I deleted the previous 2 non-working boxes and adjusted the dimensions of the just created ones to the right spots. Tested again and... didn't work! Exact same symptoms as the others.
I guess it has something to do with the settings I'm using to suit the form needs...
Copy link to clipboard
Copied
A bit of info to try to understand the issue.
My project has two maps to be placed as pictures - one is the target area (big box) and the other is an overall area (small box).
The overall area overrides the target area completely on the form, so the small box is on top of the big box in a corner.
The behavior I chose is invert and when I click the small box first, it inverts the colours only in the small one and I can upload a picture normally. Then I click the big box and it inverts the colours of the big box, and I can upload a picture normally. Then when I click on the small box again and, instead of just the small box colours being inverted, it does invert both boxes colours and it allows to change the picture on the big box only and it doesn't allow me to change the picture on the small box anymore. The only way to change the picture on the small box is saving and closing and opening the file again.
This seems to be a bug to me... but not sure.
Any ideas on how to make it work?
Thanks a lot for your help.
Copy link to clipboard
Copied
When you have two active (non-read-only) fields that overlap one another, you can get that sort of behavior. When one receives the focus, it moves to the top, which can prevent you from clicking on fields underneath, but you should be able to tab to the button and press Enter/Return.
Copy link to clipboard
Copied
Thanks for your reply. This is not very smart IMO.
Is there any way to make the user click the smaller one first (not allowing them click the big one before the small one) and then make the big one clickable once the small one has a picture already?
Thanks a lot!
Copy link to clipboard
Copied
Sure. Start off with the larger one set to read-only, and when the smaller one is clicked, set the smaller one to read-only and the larger one to not read-only. You can do this with JavaScript.
Copy link to clipboard
Copied
Oops, you got me. I am not familiar with java scripts to be honest
Would you be able to help me out?
Thanks a lot in advance!
Copy link to clipboard
Copied
I think I have managed to write the script based on one of your answers.
On the big one:
event.target.buttonImportIcon();
// Set all Design_Area fields to read-only
getField("Design_Area").readonly = true;
On the small one:
event.target.buttonImportIcon();
// Set all Overview fields to read-only
getField("Overview").readonly = false;
// Set all Design_Area fields to read-only
getField("Design_Area").readonly = false;
The only issue is when you set the big one as read-only, it comes to front of everything else on the form, but when I click on the small one (not because I can see it, but because I know where it is), the big one goes to where it was.
Copy link to clipboard
Copied
Try changing the tab order so that the big button is before the smaller button in the list of fields.
Copy link to clipboard
Copied
It didn't work... Still working on it! Open for more suggestions please
Copy link to clipboard
Copied
I might not fully understand how you have things set up. Can you post a screen shot that shows the two buttons?
Copy link to clipboard
Copied
George_Johnson wrote:
I might not fully understand how you have things set up. Can you post a screen shot that shows the two buttons?
Hi George, the below image is a screen shot of the plotting areas on the form.
So I need the small box ("Overview") on top of the big box ("Design_Area"). When I use the code, it puts the big box on top, making the small box not clickable.
Codes used:
Big box:
event.target.buttonImportIcon();
// Set all Design_Area fields to read-only
getField("Design_Area").readonly = true;
Small box:
event.target.buttonImportIcon();
// Set all Overview fields to read-only
getField("Overview").readonly = false;
// Set all Design_Area fields to read-only
getField("Design_Area").readonly = false;
Hope this makes a bit clearer?
Thanks for your help!
Copy link to clipboard
Copied
No luck George?
Copy link to clipboard
Copied
Don't overlap fields. The results are unpredictable and can change between releases and products.
Copy link to clipboard
Copied
Unfortunately I have too, because I have to follow the standard of this form which is overlapping the fields (not my choice).
Copy link to clipboard
Copied
Leority you are loosing focus, focus is with the last button or action taken, you need to set focus to the small button at the end of your script, not sure if this works
getField("Small button").setFocus();
(George will know if this is correct)
Mike
Copy link to clipboard
Copied
Super funny and super works!! You are right, I was missing the focus
The codes are as follows:
Big box:
event.target.buttonImportIcon();
// Set all Big box fields to read-only
getField("Big box").readonly = false;
getField("Small box").setFocus();
Small Box:
event.target.buttonImportIcon();
// Set all Small box fields to read-only
getField("Small box").readonly = false;
// Set all Big box fields to read-only
getField("Big box").readonly = false;
Absolute win!
Thank you Mike and George for not letting me loose the focus!!
Copy link to clipboard
Copied
Hi - has there been any discussion about how the imported image may be extracted as a file?
Sorry if this has been discussed earlier.
Thanks a lot!
Copy link to clipboard
Copied
There's no simple method to do this. When I've needed to do this, I've used the FDF Toolkit to convert the button icon to PDF and then export the image. There are other approaches you can take with just Acrobat though. How automated does it need to be?
Copy link to clipboard
Copied
Actually with a few clumpsy steps I can still get what i want: zoom in the image until it looks reasonably good on screen; take a snapshot, paste the snapshot on a powerpoint slide; and save the image as JPG.
Just that I need to take these steps 50 times, I'd like to see if there is a smarter way to save me a few clicks here and there.
Thanks for your response.
Copy link to clipboard
Copied
for work I have to fill out a form that has a insert picture of the job completed. when i click on the area it brings up the select icon window i browse for my file. it defaults to pdf. but i can change the file type, to jpg and then select my picture.
my question is how do i make it default to jpg for the file type. when i have to insert many many pictures every day it gets very old very fast. i looked around in options. if it's part of the form i can get the form modified.. but i would need to know exactly to what so i can pass that on to the IT dept.
Copy link to clipboard
Copied
Check out this other thread where I posted a folder-level script that helps with this: event.target.buttonImportIcon();