I have a form using an image field so the client can click the box and drop a picture into it. When this is done, it does shrink the image to fit the box which is great but it seems to justify the image to the top left of the box. Is there a way to have it center in the middle, horizontally and vertically?
Views
Replies
Total Likes
Hi,
I don't think that you can change this behaviour. It can be annoying, but I think we are stuck with it.
Changing the scaling to fit rectangle will use the full extent of the image field, but may distort the original aspect ratio.
Niall
Views
Replies
Total Likes
Actually I just figured it out! Use the script "this.para.hAlign = "center";" and it seems to do it. Also works on text fields :-)
Views
Replies
Total Likes
Well done! Good catch!
this.para.hAlign = "center";
this.para.vAlign = "middle";
Works in the docReady event and retains the settings as the user changes images.
Niall
Views
Replies
Total Likes
where do you put that code in? I'm lost...
Views
Replies
Total Likes
Like a lot of things with LiveCycle, Ive learned in the few days since I have been using it that nothing is easy to find even if you are familiar with Adobe products.
But scripts are entered into Window/Scripts Editor. It shows as a tool bar at the top of the page. Click on your text box that you want the script to be used on, then select Initalize in the editor, and enter the code in the window next to it
Views
Replies
Total Likes