Highlighted

Adobe Acrobat Pro DC. Mac. Show Instructions in Text Fields on Forms.

New Here ,
Sep 24, 2020

Copy link to clipboard

Copied

Hi,

 

I am trying to create fillable form text fields which show an instruction inside the field box that disappears on selection / entry (i.e. "Enter Date", etc).

 

I am new to Adobe and have noted previous discussions on this issue but cannot locate what / where javascript (etc) may be used in Adobe Acrobat Pro DC for Mac?

 

Any help much appreciated.

 

Thanks.

TOPICS
How to, PDF forms

Views

97

Likes

Translate

Translate

Report

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

Adobe Acrobat Pro DC. Mac. Show Instructions in Text Fields on Forms.

New Here ,
Sep 24, 2020

Copy link to clipboard

Copied

Hi,

 

I am trying to create fillable form text fields which show an instruction inside the field box that disappears on selection / entry (i.e. "Enter Date", etc).

 

I am new to Adobe and have noted previous discussions on this issue but cannot locate what / where javascript (etc) may be used in Adobe Acrobat Pro DC for Mac?

 

Any help much appreciated.

 

Thanks.

TOPICS
How to, PDF forms

Views

98

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 24, 2020 0
Most Valuable Participant ,
Sep 24, 2020

Copy link to clipboard

Copied

It's exactly the same for Mac as for Windows. What were you not able to find, and what did you see instead?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 24, 2020 0
New Here ,
Sep 25, 2020

Copy link to clipboard

Copied

Hi,

 

Thanks for coming back.

 

I am trying to achieve the following look (which I have created on MS Word) in Acrobat:  Screenshot 2020-09-25 at 08.54.06.png

 

I have found this article which, I believe, discusses the solution: https://answers.acrobatusers.com/Is-add-instructional-text-text-field-disappear-clicked-q195078.aspx.  This, whilst appearing to be an older article, suggests the following javascript solution:

 

// Custom Format script for text field

if (!event.value) {

event.value = "Instructional text goes here";

event.target.display = display.noPrint;

} else {

event.target.display = display.visible;

}

 

Will this still work or does it need updating?  Am I correct in understanding it should be entered in the "Properties" > "Format" section for each text field?

 

I have had issues with diving into coding before and am keen to make sure I do not make a rookie mistake!

 

Thanks.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 25, 2020 0
Most Valuable Participant ,
Sep 25, 2020

Copy link to clipboard

Copied

Yes, it needs to be entered into each field, and yes, it should still work.

Note, though, that unlike in Word if you do it in a PDF using multiple fields the rest of the text will not "re-flow" to adjust itself to the length of the value entered in the field. So if you entered a short name you'll be left with an empty space between it and the rest of the sentence.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 25, 2020 0
New Here ,
Sep 25, 2020

Copy link to clipboard

Copied

Thats great, thanks.  I tried the code and it appears to work as desired.  I suspect, on the "re-flow" issue, I will need to adapt the space either side of the text box.  

 

On a related point, do you know what javascript I will need to adjust the "Enter Date" text to display custom font, size, colour, etc.  I am particularly keen to change the font colour?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 25, 2020 0
try67 LATEST
Most Valuable Participant ,
Sep 25, 2020

Copy link to clipboard

Copied

What colors do you want to use?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 25, 2020 0