How to Keep Instructional Text Teal After Resetting a PDF Form
Question details
The user wants to prevent instructional placeholder text in PDF form fields from reverting from teal to black when the form is reset.

- Product
- Adobe Acrobat / PDF Editor
- Device & OS
- not provided
- Scenario
- Managing an interactive PDF form where instructional text uses custom colors, and ensuring these styles persist after a form reset action is triggered.
- Observed behavior
- Instructional text in the form field automatically changes from teal to black after resetting the form, overriding the On Focus and On Blur JavaScript actions designed to control the color.
Before modifying JavaScript actions in your PDF form, create a duplicate copy of the file to ensure your existing field configurations are safely preserved.
Use a Custom Format Script to Assign Text Color
Instead of relying on On Focus and On Blur triggers, apply a Custom Format Script to dynamically evaluate the field content and maintain the appropriate text color even after a reset.
A form reset action often reinitializes the base appearance properties of a field. If you use On Focus and On Blur actions to change text colors, these changes are generally discarded during a reset, reverting the text to its default black color.
By utilizing a Custom Format Script, the PDF reader will actively assess whether the field contains user input or remains empty, applying the teal color to the instructional text reliably.
Open your PDF form in your PDF editor (such as Adobe Acrobat) and activate the Form Preparation or Edit Form mode.
Right-click the problematic form field and select Properties. Navigate to the Actions tab and delete any existing On Focus, On Blur, or field appearance scripts that previously managed the text color.
In the Field Properties window, switch to the Format tab. From the Select format category dropdown menu, choose 'Custom'.
Click the Edit button next to the Custom Format Script box. Enter JavaScript to define the color behavior based on field content. For example, instruct the script to set 'event.target.textColor' to a teal RGB value when empty, and to black when it contains user input.
Close the Properties dialog and exit form editing mode. Type into the field, then trigger the form's reset button to verify that the instructional text successfully reverts to teal.

Easily Manage PDF Forms with WPS PDF
If you need a straightforward way to fill, edit, and manage interactive PDF forms without dealing with complex JavaScript setups, WPS PDF offers a user-friendly and highly compatible editing experience.
- 1. Open Your PDF: Launch WPS Office and open your interactive PDF document using the WPS PDF tool.
- 2. Access Form Tools: Navigate to the Form tab on the top ribbon to view all available interactive form fields.
- 3. Fill or Modify Fields: Click on any text field to input data or use the floating properties menu to easily adjust text color and styling.
- 4. Save the Document: Click the Save icon to lock in your filled data and any formatting adjustments you made.

Frequently Asked Questions
Why does my PDF form field text color change back to black on reset?
A form reset function typically clears the field's temporary states and reverts it to its default Appearance settings. If the default text color is set to black, any dynamic changes made via On Focus or On Blur actions will be lost during the reset.
Can I use RGB values to set text color in PDF JavaScript?
Yes, PDF JavaScript supports color arrays. You can define specific colors like teal by using the syntax ['RGB', red-value, green-value, blue-value], where values range from 0 to 1 (e.g., ['RGB', 0, 0.5, 0.5]).
What is the difference between a Custom Format Script and an On Blur action?
An On Blur action triggers only when the user clicks away or tabs out of a specific field. A Custom Format Script actively evaluates the data format and styling whenever the field's value is calculated or changed, ensuring the styling remains consistent even after global actions like a form reset.




