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
  • 4 replies
  • 41 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.

    4 replies

    ethonbrooks0707
    Participant
    July 30, 2026

    Yes, that approach should work. A checkbox or radio button can be used to trigger JavaScript that fills the related fields with "N/A", makes them read-only, and optionally changes the background color to show they aren't required. Just remember to include logic that restores the original state if the checkbox is cleared. That keeps the form flexible for both scenarios.

    JohnH.AETA001
    Participant
    July 30, 2026

    Thank you both for your replies.  My apologies for my late response.

     

    In my example, Section 3.36 is only linked to 3.37.  Section 3.38 is a separate operation.

    This particular document is over 6 pages long in total with @30 different possible sections for completion either as N/A when not required or filled in by our personnel.  Having the drop-down function would be an option (I’ve sussed out how to do this) but for longer documents it still takes time to go through that process.

    The ideal option would be as below in having a button to grey out (and display ‘N/A’ or line the cell through) if a particular section wasn’t required.  In this example below, all x24 cells would be greyed out as per the surrounding cells with N/A detailed in the 1st cell.

    I can provide a trial doc for you but due to the content and technical info on the forms I will need to alter or redact this so as to stay within the bounds of my Companies IT & Technical info security protocols.

    Kind regards

    JH.

    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