How do I disable checkboxes in a group if a specific check box is checked?

Viewed 32

This is for DocuSign API: I have 6 checkboxes where the 6th checkbox is "Prefer not to answer". If the 6th checkbox is checked, I want to clear and disable the first 5 boxes. 1 or more of the first 5 can be checked if the 6th box is not checked. Overall, at least 1 box has to be checked.

I will be using the tab group method outlined in Checkbox validation using Docusign REST API to require at least 1 box to be checked. Will the "Prefer not to answer" have to be in a separate group? If so, how do I make sure that at least 1 box is selected in one or the other group?

Any help is greatly appreciated.

** Update ** I can't seem to get the tabGroups to work. Can you help me with the code?

                    <tabGroups>
                        <groupLabel>ChkBxGrpRace</groupLabel>
                        <groupRule>SelectAtLeast</groupRule>
                        <maximumAllowed>5</maximumAllowed>
                        <minimumRequired>1</minimumRequired>
                        <pageNumber>
                            <string>2</string>
                        </pageNumber>
                        <validationMessage>Please check one or more races, or Prefer not to answer</validationMessage>
                    </tabGroups>
1 Answers

Perhaps make two groups of checkboxes (five in one, and "Prefer not to answer" in the second). Add a conditional field rule that disables the first group if the second group is checked.

Protip: Define a template using the DocuSign webapp. Then your API call simply uses the template. It is much easier to define a template using the webapp than defining envelope features via the API.

Here's a Live Example via the API Request Builder that sends an envelope by using a template and filling in dynamic data when the envelope is sent.

Related