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

Default text not deleting when tabbing from field to field

KDavenport
Registered: Dec 15 2011
Posts: 4

One box on my form is not deleting the default text as a user tabs from field to field. The user has to select the default text and delete it manually. The only difference in this box than the others is that it is larger and the selected options are multi-line, scroll long text, and max characters 2400. All other text boxes are scroll long text only.
 
What can I do to get this text box be set up to automatically highlight the default text when tabbed to?

My Product Information:
Acrobat Pro 10.1, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Why should the default text be deleted when you're tabbing from field to field? You're not making any changes to the actual field value when doing so, aren't you?

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

KDavenport
Registered: Dec 15 2011
Posts: 4
What the requester asked for is to have the default text say a more detailed instruction for what the user needs to enter in the text box. The requester didn't want all of the instructions listed as a title before the text box. For example "Enter an overview of partner offerings and solutions" for a title "Partner Description". The form highlights the content of the text boxes as I tab through the document and if I want to type in it, the highlighted text is deleted and replaced with what I type. The other text boxes I have on this form act this way, but this one text box tabs to the end of the directions without highlighting it. In order to fill this one text box out, the user has to delete the content of the directions by either hitting the backspace button 52 times or selecting the content with his mouse and hitting backspace. All of the other text boxes on this form highlight/select the default content as I tab through the document except this one text box. Is there a way to control whether or not the content is highlighted?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
A different approach that provides for what I think is a better user experience is to use a custom Format script to show the instructions when the field is blank, something like:

// Show instructions if the field is empty
if (!event.value) event.value = "Instructions go here.";


This way, the user doesn't have to delete anything.
KDavenport
Registered: Dec 15 2011
Posts: 4
I'm not an advanced user, so please bear with me, but I tried to put in that code in the run custom validation script tab. It still acts the same way - the instructions still stay after I tab to that text box. Am I doing it incorrectly?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
This is not a Validate script, but a Format script. Be sure to remove any text that's currently in the field. The default text that you specify in the script will then get displayed.
KDavenport
Registered: Dec 15 2011
Posts: 4
Thanks, George! I had to delete the box and recreate it because it was not changing the default text in the code for whatever reason, but the new box works. Your solution works better than my original.