These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Naming a text box - Name visible when not in edit mode

sanaa
Registered: Apr 19 2011
Posts: 6
Answered

Hi - Hi - I am fairly new to editing pdfs. I am currently creating a pdf off a word document. I have created the appropriate text boxes, but would like to save the template name in the text box. I would also like to be able to click on the template name, and have it all selected and ready to be replaced. Is this at all possible?

My Product Information:
Acrobat, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You'll need to describe you're situation in more detail. What do you mean by "template"? And by "Text Box", do you mean a form field?

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

sanaa
Registered: Apr 19 2011
Posts: 6
Sorry for not being specific. I inserted a text field into the document. I want to be able to indicate what should be written in the text field, specifically by typing into the text field, and having that text be selected when you click on it. Does that make sense?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Accepted Answer
It sort of makes sense. You'd like to preselect a portion of text in a text field? If that's what you want, it can't really be done.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

sanaa
Registered: Apr 19 2011
Posts: 6
Thanks. What I really want to be able to do is indicate what should be put in the text field, but have it be easy to read. I tried putting a labeled button behind the text box, but don't like the look of that. Is there anything you would recommend doing?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I still don't understand what you are looking for. To "indicate" what should be entered into a field, the field usually has a static label. Do you mean something different?


Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
If you want the text to go away when the field has the focus and is not blank, you can use a custom Format script for the field that looks like:

  1. // Display message text if field is blank
  2. if (!event.value) event.value = "Your message text goes here";
sanaa
Registered: Apr 19 2011
Posts: 6
How would I create a Format script? I'm sorry, I am very new to this and really don't know how to do much.


thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Here's an article that covers the details:
http://acrobatusers.com/tutorials/2006/formatting_text_fields

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script