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

Formatting a Fillable Text Box

New Here ,
Oct 16, 2021 Oct 16, 2021

Copy link to clipboard

Copied

I use Adobe Acrobat Pro 2017 for my PDF needs.  I have a PDF form with many fillable text boxes and I need to add a "Comments" fillable text box.  I would like to have the word "Comments:" be part of the text box (inside the text box, in the upper left corner) but unchangeable by the user when they are typing their text.  So, basically "Comments:" would be the VISIBLE label for the text box to show the user which text box should be used for their comments.  If I move the text box around (reposition it into a different part of the document) then the unchangeable "Comments:" text would move with the text box.

 

So, two questions:

1) Can this be done using Adobe Acrobat Pro 2017?

2) If 'No' to question #1, then can it be done with any other Adobe product which is made specifically for creating and manipulating PDF documents?

 

Thanks in advance!

TOPICS
How to

Views

356

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
community guidelines
Community Expert ,
Oct 17, 2021 Oct 17, 2021

Copy link to clipboard

Copied

Yes, it's possible.

As the default value of the text field enter "Comments:". Then go to the Format tab, select Custom and click on Edit next to the Custom Keystroke Script option and paste the following code into the editor window:

 

 

event.rc = /^Comments:/.test(AFMergeChange(event));

 

 

After you click OK in that editor window something strange will happen. The selection will revert back to None and it will appear as if the code you entered has disappeared. It hasn't. Just click on Close, exit Prepare Form mode and try editing the field. You'll see that you can't delete the "Comments:" part at the start of it.

Votes

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
community guidelines
New Here ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

try67,

I did as you suggested and mostly everything happen just like you said it would happen, EXCEPT the final test DID NOT work -- Read on...

 

Here's what  I did:

1)  Opened the PDF using Adobe Acrobat Pro 2017

2)  Clicked on "Tools", then "Prepare Form"

3)  Right clicked in the "Comments:" text box, then selected "Properties..."

4)  Clicked on the "Format" tab and then "Select format category: Custom"

5)  Clicked on "Edit" button after "Custom Keystroke Script"

6)  Cut-and-pasted your code (including the semi-colon at the end) into the "Create and Edit JavaScripts" box that opened

7)  Clicked "Ok" and saved the form

 

When I went into the form, I DID NOT see the word "Comments:" inside the fillable text box -- the text box was completely empty.  Also, when I placed the cursor in the Comments box and typed a few letters, NOTHING appeared and the cursor DID NOT move.  To back out the change, I redid the steps above except this time for Step #6, I left the "Create and Edit JavaScripts" box empty and clicked "Ok" (Step #7).  Now when I go into the "Comments:" text box, characters that I type DO appear.

 

Any ideas?

Votes

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
community guidelines
Community Expert ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

You skipped this part of my instructions:

> As the default value of the text field enter "Comments:".

You can do that by going to the field's Properties, Options tab and entering the text there under "Default Value".

Votes

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
community guidelines
New Here ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

LATEST

Is there a way to replicate this but make the default text value (i.e. "Comment", in this case) editable for all users?

Votes

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
community guidelines