Using JavaScript to Clear Default Text on PDF Forms

Making PDF Form Fields Dynamic with JavaScript

One of those tricks everybody always asks me for is the ‘default text goes away’ click
behavior in form fields. In this video, I demonstrate a bit of JavaScript code in a PDF
form that removes the default text, then puts it back in in the event you didn’t type anything.

I found the original code here: https://acrobatusers.com/forum/forms-acrobat/clear-default-value-text-field-when-clicked/

3 Comments

  1. This makes use of JavaScript s handy ability to add arbitrary properties to any element.

  2. blr7777.net says:

    Is this to clear a default value or sample text that initially appears on the form?

Leave a Reply

Your email address will not be published. Required fields are marked *