Skip to main content
Saher Naji
Inspiring
Feb 7, 2025 6:02 PM UTC
Answered

Remove Tooltips from Form Fields in Adobe Acrobat

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.

 

 

 

 

 

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();

 

 

 

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/

Thom Parker
Thom ParkerCorrect answer
Community Expert
Feb 7, 2025 6:19 PM UTC

There is no "field.toolTip" property.  

 

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

3 replies

JR Boulay
Community Expert
Community Expert
Feb 7, 2025 11:19 PM UTC

You can use the (free) Tooltip Remover action:

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

Translate
Acrobate du PDF, InDesigner et Photoshopographe
Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
Feb 7, 2025 6:19 PM UTC

There is no "field.toolTip" property.  

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Saher Naji
Inspiring
Feb 7, 2025 6:37 PM UTC

Thanks @Thom Parker 

 

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

Translate