Skip to main content
JohnH.AETA001
Participant
June 26, 2026
Answered

I have a form which requires multiple fields to be N/A'd and possibly shaded out if they are not required. Can this be done in Acrobat Pro by adding a radio button or 'N/A' checkbox and scripting via the 'Mouse up' action of the checkbox?

  • June 26, 2026
  • 2 replies
  • 20 views

On the example below, currently N/A has to be entered manually by typing in the cell or freehand using a stylus.  This is causing some issues with the time taken to complete some of our larger forms and also handwriting skills and neatness vary greatly between our personnel, as can be seen in the 2nd pic below.

The plan is to add a 2nd column with an ‘N/A?’ checkbox next to the numbered ones so that selecting it would add ‘N/A’ to the adjacent fillable cells - and possibly grey them out as well.  The 1st pic below does show the fillable cells coloured but once entries are made and the form saved, when reviewed using Adobe Reader the shading is not visible.  It would be referrable to retain the shading if at all possible.

As in the 3rd pic, is it possible to get just one entry of N/A added and the rest of the cells lined through from corner to corner?

I’m relatively inexperienced using scripting in Acrobat in this manner so any assistance would be very much appreciated.

 

 

 

    Correct answer ls_rbls

    Hi ​@JohnH.AETA001 ,

     

    To get more clarity, if section 3.6 “POI Application HV/MV: (Switching Out)” is marked as N/A does that implies that sections 3.37 and 3.38 are filled out automatically with N/A and disabled ?

     

    If yes, you may use employ a hybrid approach using very minimal scripting with Acrobat built-in features.

     

    For instance, instead of providing the users with a fillable textfield in section 3.36, use instead a fillable dropdown menu with the option to select a blank entry, or the a blank option , allowing them to type in their own answer, or select from the pick list N/A.

     

    If the user selects the N/A option, a simple custom format script as indicated by ​@Thom Parker  can handle that, disabling the signature, date and time textfields as read-only and shading them with a color (if desired).

     

    And for section 3.28 you may assign a checkbox or even a button object to handle that.

     

    In any case, if you are able to share a dummy copy of the original PDF file (with no sensitive data on it),  I can add the examples to it and you can check if that is the desired workflow.

    2 replies

    ls_rbls
    Community Expert
    ls_rblsCommunity ExpertCorrect answer
    Community Expert
    June 26, 2026

    Hi ​@JohnH.AETA001 ,

     

    To get more clarity, if section 3.6 “POI Application HV/MV: (Switching Out)” is marked as N/A does that implies that sections 3.37 and 3.38 are filled out automatically with N/A and disabled ?

     

    If yes, you may use employ a hybrid approach using very minimal scripting with Acrobat built-in features.

     

    For instance, instead of providing the users with a fillable textfield in section 3.36, use instead a fillable dropdown menu with the option to select a blank entry, or the a blank option , allowing them to type in their own answer, or select from the pick list N/A.

     

    If the user selects the N/A option, a simple custom format script as indicated by ​@Thom Parker  can handle that, disabling the signature, date and time textfields as read-only and shading them with a color (if desired).

     

    And for section 3.28 you may assign a checkbox or even a button object to handle that.

     

    In any case, if you are able to share a dummy copy of the original PDF file (with no sensitive data on it),  I can add the examples to it and you can check if that is the desired workflow.

    Technical Generalist
    Thom Parker
    Community Expert
    Community Expert
    June 26, 2026

    Displaying N/A in a field that has not been filled can be accomplished with a custom format script. 

    For example:

    if(event.value == “”) event.value = “N/A”;

     

    Here’s an article that explains how to fade (grey out/disable) a field, this can also be used to display the NA text when greyed:

    https://acrobatusers.com/tutorials/js_disabling_fields/

     

    Be aware that this technique, and all PDF scripting techniques only work when the PDF is displayed in a viewer that supports the Acrobat Scripting model. Which doesn’t include any browser based or mobile device PDF Viewers. 

     

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