Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Text Form fields to show on top of Image Form Field

New Here ,
Jul 26, 2020 Jul 26, 2020

I need to place a text form field on top of an image form field (that the user uploads) - i.e. i want the text that a user types in to be showing on top of the image after the user has uploaded their photo. The user will be using Adobe Acrobat Reader DC the free version (not Pro)

 

Is this possible?  I can't seem to get the image form field (once a photo has been uploaded) to move behind a text form field.

 

Thanks

Simone

TOPICS
How to , PDF forms
5.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2020 Jul 26, 2020

You could try using the button label.  Image form fields are actually buttons. And it can be setup to show a label over the button image. Look at the Options tab on the field properties. Set the Layout to one of the Label plus Icon options. 

You'll need a way to get user entered text onto the label. I'd suggest adding this code to the existing MouseUp script on the "image" (button) field.

 

var cLabel = app.response("Enter Label Text");

event.target.buttonSetCaption(cLabel);

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 26, 2020 Jul 26, 2020

Thanks for  your speedy help! I just tried that and it works a treat but I'm looking for something that I can customize a bit more.  Is it possible to choose different alignments of that label (apart from the default center, top, bottom?) and change the fonts/colors like in a regular text field? or multiple labels?

 

Alternatively, is it possible to flatten that photo once it's been uploaded (in the free Reader) so if I put text fields on top they will show up?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 27, 2020 Jul 27, 2020

The appearance tab on the properties dialog controls the font properties, same as on the text field. 

The label positions are what they are. Can't flatten in the free Reader. But the button field can be made ReadOnly. 

 

However, text fields can be made to sit on top of the button field, simply by the order in which they are created. The text field will not show when the button has the focus, but as soon as the focus changes it should become visible over the button. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2020 Jul 27, 2020

NEVER overlap visible fields. The display order is not well defined and may change in different apps/viewers/printers. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 27, 2020 Jul 27, 2020
LATEST

I hear you Andy, It's definately not a reliable strategy. Definately a bad idea.  

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 27, 2020 Jul 27, 2020

It's not a good idea to have overlapping fields since you can't explicitly control their z-order (ie, which one will appear on top of another). It's basically works so that the last field you edit (not fill it, but actually manipulate in Form Edit mode) is the one on top, which is not very convenient. I would strongly recommend looking for an alternate way of doing it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines