Skip to main content
Participant
July 7, 2025
Answered

Check boxes

  • July 7, 2025
  • 2 replies
  • 628 views

I have acrobat form with lots of checkboxes on it. Using pdf script I've setup some checkboxes to be disabled when one of others is checked. I also have RESET button that reset the form. However, after reseting the form, only checkbox(es) that were previously checked are accesable. After selecting and  diselecting such checkboxes, I can acces other checkboxes. Is there way to reset the form in a such way to allow selecting any checkbox to start with?

    Correct answer Nesa Nurani

    Do you use script in a checkbox or a button field?
    If in button field you need to remove condition like this:

    var fieldsToReset = ["QMS-YES","QMS-NO","YES-A","YES-B","YES-C","YES-D","PAR-A","PAR-B","PAR-C","PAR-D","NO-A","NO-B","NO-C","NO-D"];
    this.resetForm(fieldsToReset);

     

    And if you wish to also set fields to not be read only, add this also:

    for(var i=0; i<fieldsToReset.length; i++) {
     var f = this.getField(fieldsToReset[i]);
     f.readonly = false;}

    2 replies

    Nesa Nurani
    Community Expert
    Community Expert
    July 8, 2025

    This behavior is likely caused by the script dynamically disabling certain checkboxes when others are selected—without properly re-enabling them during a full form reset. Since Acrobat’s resetForm() method restores field values but does not change their read-only status, checkboxes that were disabled by script remain inaccessible after the reset.

    To resolve this, you’ll need to explicitly re-enable all relevant checkboxes as part of the reset process. Instead of relying solely on the resetForm() action, assign a custom script to your Reset button that first re-enables the checkboxes, and then performs the form reset.

    SEAD6C2CAuthor
    Participant
    July 8, 2025

    I've tried something like that, but I'm not an expert in this.

    I put this piece of code in the front of Reset action.

     

    var fieldsToReset = ["QMS-YES","QMS-NO","YES-A","YES-B","YES-C","YES-D","PAR-A","PAR-B","PAR-C","PAR-D","NO-A","NO-B","NO-C","NO-D"];//add more field names if needed
    if(event.target.value == "Off"){
    this.resetForm(fieldsToReset);}

     

    Any suggestion how to do that? Thx in advance.

    Nesa Nurani
    Community Expert
    Nesa NuraniCommunity ExpertCorrect answer
    Community Expert
    July 8, 2025

    Do you use script in a checkbox or a button field?
    If in button field you need to remove condition like this:

    var fieldsToReset = ["QMS-YES","QMS-NO","YES-A","YES-B","YES-C","YES-D","PAR-A","PAR-B","PAR-C","PAR-D","NO-A","NO-B","NO-C","NO-D"];
    this.resetForm(fieldsToReset);

     

    And if you wish to also set fields to not be read only, add this also:

    for(var i=0; i<fieldsToReset.length; i++) {
     var f = this.getField(fieldsToReset[i]);
     f.readonly = false;}
    kglad
    Community Expert
    Community Expert
    July 7, 2025

    in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

    p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



    <"moved from using the community">