How to Add Placeholder Text to Interactive PDF Form Fields
Question details
The user needs to display instructional placeholder text within interactive PDF text fields that automatically disappears when clicked or edited.

- Product
- PDF Editors and Form Designers
- Device & OS
- not provided
- Scenario
- Designing an interactive PDF form for user distribution and clear data collection.
- Observed behavior
- The text fields need to display guidance text by default, which successfully clears out the moment a user interacts with the field or begins typing.
Ensure you have a PDF editor that supports form creation and custom JavaScript execution, and verify that your recipients will use a PDF viewer compatible with interactive forms.
Use Custom JavaScript in PDF Field Properties
Implement interactive placeholder text using field JavaScript that clears upon focus and resets on blur in standard PDF editors.
Standard interactive PDF forms do not always have a native 'placeholder' attribute. To achieve the disappearing text effect, you must add simple JavaScript rules to the field's 'On Focus' and 'On Blur' events. This ensures the text acts as an instruction and doesn't get submitted as user data.
Open your PDF in form editing mode, right-click the target text field, and select 'Properties'.
In the 'Options' tab, type your instructional text into the 'Default Value' box.
Navigate to the 'Actions' tab. Select 'On Focus' as the trigger, choose 'Run a JavaScript', and add a script to clear the field if its current value matches your default instructional text.
Still in the 'Actions' tab, add another action for the 'On Blur' trigger. Write a script that restores the default instructional text if the user clicks away while the field is completely empty.

Apply Ghost Text in LiveCycle or AEM Forms Designer
Use the built-in ghost text feature if you are creating forms using dedicated enterprise platforms like Adobe LiveCycle or AEM Forms Designer.
Create and Manage Interactive PDF Forms Easily with WPS Office
WPS PDF provides powerful and user-friendly tools to handle interactive PDF forms. You can easily insert text fields, checkboxes, and modify form properties, streamlining your data collection process.
- 1. Open WPS PDF: Launch WPS Office and open your PDF document using the built-in PDF editor.
- 2. Navigate to the Form Tab: Click on the 'Form' tab in the top ribbon to access interactive form tools.
- 3. Insert Text Fields: Select 'Text Field' and click anywhere on the page to place your fillable box.
- 4. Edit Properties: Double-click the inserted field to modify its properties, default text, and formatting settings.

Frequently Asked Questions
Why doesn't my placeholder text disappear when clicked?
This usually happens if the JavaScript triggers are not configured correctly for the 'On Focus' event, or if the recipient is using a basic PDF viewer that does not support JavaScript execution.
Can I add placeholder text to a PDF without writing code?
Standard PDF properties generally require JavaScript for dynamic disappearing text. However, advanced form creators like AEM Forms Designer have built-in UI options (Ghost Text) that handle this automatically without manual coding.
Will placeholder text be printed if the user leaves the field empty?
Yes, standard default text will print unless you configure the form field properties to be 'Visible but doesn't print', or you add a pre-print JavaScript to clear untouched placeholder values.




