Skip to main content
axelr16807532
Participant
February 2, 2026
Question

Hoe kan je voorwaardelijk verplichte velden instellen in een pdf?

  • February 2, 2026
  • 1 reply
  • 65 views

In een pdf formulier heb ik 2 opties om in te vullen.

Alle velden zijn verplicht, echter kies ik voor optie 1 is invullen van optie 2 niet nodig en vice versa.

 

    1 reply

    Dave Creamer of IDEAS
    Community Expert
    Community Expert
    February 2, 2026

    Required fields only work for forms that are submitted electronically with a Submit button.

    If you don’t have lots of fields, I would consider a radio button that triggers the hide/show for each field. 

     

    David Creamer: Community Expert (ACI and ACE 1995-2023)
    axelr16807532
    Participant
    February 2, 2026

    The problem is that there are 2 sections in the form.

    All fields in each section are mandatory.

    Section 1 is for a private person, section 2 is for a firm.

    If section 1 is applicable there is no need to fill in section 2 and vice versa.

    Is there a way when choosing section 1 to deactivate section 2 and vice versa?

     

    Dave Creamer of IDEAS
    Community Expert
    Community Expert
    February 2, 2026

    @Dave Creamer of IDEAS You can run a Javascript.

    Create a radio button with two choices: Private and Firm (or similar).

    Create a Javascript action for each.

    This _should_ work but I’m not an expert programmer…

    First, set all fields except radio button to Read Only.

    For Private:

    this.getField("PrivateField01").readonly = false; // Unlocks field
    this.getField("PrivateField01").required = true; // Optional: Makes required

    Repeat for each Private field, then do a similar thing for the Firm fields.

     

    Another option:

    var fieldsToLock = ["Students Name", "District ID", "Grade", "Date"]; // Replace with your field names

    for (var i in fieldsToLock) {
    var field = this.getField(fieldsToLock[i]);
    if (field) {
    field.readonly = true;
    }
    }

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

     

     

    David Creamer: Community Expert (ACI and ACE 1995-2023)