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

Remove Tooltips from Form Fields in Adobe Acrobat

Contributor ,
Feb 07, 2025 Feb 07, 2025

This JavaScript code for Adobe Acrobat provides a simple and efficient way to remove tooltips from all form fields in a document. Tooltips can sometimes be problematic, especially when editing a preexisting file with non-ideal tooltips. In such cases, it's often best to remove all tooltips and start fresh. By clearing the toolTip property, this script ensures a clean slate. You can then add the correct tooltips as needed.

 

A success message will notify you of the number of fields modified. This tool is a real time-saver for anyone looking to streamline form edits and improve user experience.

 

1.png

 

 

 

 

function removeAllTooltips() {
    try {
        // Get all fields in the document
        var numFields = this.numFields;
        var modifiedCount = 0;
        
        for (var i = 0; i < numFields; i++) {
            var fieldName = this.getNthFieldName(i);
            if (fieldName) {
                var field = this.getField(fieldName);
                if (field) {  // Include all field types, including buttons
                    if (field.userName || field.toolTip) {
                        field.userName = "";  // Clear userName (tooltip)
                        modifiedCount++;
                    }
                }
            }
        }
        
        // Show success message
        app.alert("Successfully removed tooltips from " + modifiedCount + " fields!", 3);
    } catch (error) {
        app.alert("Error: " + error.toString(), 1);
    }
}

removeAllTooltips();

 

 

Screenshot 2025-02-07 205322.png

 

Feel free to modify the script as needed for your specific use case, and don’t hesitate to share any improvements or suggestions with the community!

 

https://saherforms.myportfolio.com/

TOPICS
Edit and convert PDFs , General troubleshooting , How to , Install update and subscribe to Acrobat , JavaScript , Modern Acrobat , PDF , PDF forms
611
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
1 ACCEPTED SOLUTION
Community Expert ,
Feb 07, 2025 Feb 07, 2025

There is no "field.toolTip" property.  

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

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 ,
Feb 07, 2025 Feb 07, 2025

There is no "field.toolTip" property.  

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
Contributor ,
Feb 07, 2025 Feb 07, 2025

Thanks @Thom Parker 

 

You're absolutely right! I've updated the script

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 ,
Feb 07, 2025 Feb 07, 2025
LATEST

You can use the (free) Tooltip Remover action:

https://www.abracadabrapdf.net/utilitaires/utilities-in-english/tooltips-remover_en/


Acrobate du PDF, InDesigner et Photoshopographe
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