Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Request for Assistance with JavaScript Formatting in PDF Forms

New Here ,
May 13, 2025 May 13, 2025

Dear Adobe Support Team,

I hope this message finds you well. I am reaching out to seek assistance regarding an issue I am experiencing with the JavaScript functionality in Adobe Acrobat while working on a PDF form.I have implemented a JavaScript code to dynamically format form fields based on their values. Specifically, I want the fields to display a light red background with dark red text when the values are below 1.0 or above 1.6. Conversely, for values within the range of 1.0 to 1.6, I would like the background to be white with black text.
Current Implementation:
I have added the JavaScript code to the text fields. However, I am encountering the following issues:

    • When I click out of the field, the text color changes to white, and the background remains blue instead of displaying the specified dark red text on a light red background.Naitik386561336wfg_0-1747200728300.png

       

    • The formatting does not persist after the field loses focus.

Request for Assistance:
I would greatly appreciate your guidance on how to resolve this issue so that the desired colors are applied and maintained correctly after the user clicks outside the field. If there are alternative methods or specific settings that I should be aware of to achieve this functionality, please let me know.Thank you for your attention to this matter. I look forward to your prompt response.

Br,
Naitik

TOPICS
JavaScript , PDF , PDF forms
332
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 13, 2025 May 13, 2025

What script do you use?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2025 May 14, 2025

You must disable the fields highlighting feature of the application to see the fill color you've applied.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2025 May 14, 2025
LATEST

You will find the reason and the solution here:

https://pdfautomationstation.substack.com/p/form-field-color-issues

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines