Skip to main content
Solved

Docusign Checkbox model

  • November 5, 2024
  • 2 replies
  • 76 views

Forum|alt.badge.img+2

How Can I use checkbox class for yes or no option to select only one option. I know how to do it with radio and radio group class. Could  anyone suggest how to proceed it with checkkbox class in c# SDK.

Best answer by Byungjae.Chung

To create the checkbox with the rule, first, create the checkbox tabs and associate them with the TabGroup through the TabGroupLabels. In the TabGroup object, you can specify the checkbox rule through the GroupRule, MinimumRequired, and MaximumReqiured properties. More information about the available value for the above properties is here: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/#schema__envelopedefinition_recipients_signers_tabs_checkboxtabs_required

C# code example below allows the recipient to select only one checkbox between 3 of them.
 

Checkbox checkbox1 = new Checkbox
{
    TabLabel = "LionTab",
    DocumentId = "1",
    PageNumber = "1",
    RecipientId = "1",
    XPosition = "200",
    YPosition = "300",
    TabGroupLabels = new List<string>
    {
        "checkboxgroup1"
    }
};
Checkbox checkbox2 = new Checkbox
{
    TabLabel = "TigerTab",
    DocumentId = "1",
    PageNumber = "1",
    RecipientId = "1",
    XPosition = "220",
    YPosition = "300",
    TabGroupLabels = new List<string>
    {
        "checkboxgroup1"
    }
};
Checkbox checkbox3 = new Checkbox
{
    TabLabel = "BearTab",
    DocumentId = "1",
    PageNumber = "1",
    RecipientId = "1",
    XPosition = "240",
    YPosition = "300",
    TabGroupLabels = new List<string>
    {
        "checkboxgroup1"
    }
};
TabGroup checkboxTabGroup = new TabGroup
{
    GroupLabel = "checkboxgroup1",
    ValidationMessage = "Please check a box",
    GroupRule = "SelectExactly",
    MinimumRequired = "1",
    MaximumAllowed = "1",
    RecipientId = "1",
    DocumentId = "1",
    PageNumber = "1",
    XPosition = "0",
    YPosition = "0",
    TabScope = "Document", // or "envelope"
    TabType = "tabgroup"
};

Tabs signer1Tabs = new Tabs
{
    SignHereTabs = new List<SignHere> { signHere1 },
    CheckboxTabs = new List<Checkbox> { checkbox1, checkbox2, checkbox3 },
    TabGroups = new List<TabGroup> { checkboxTabGroup }
};

signer1.Tabs = signer1Tabs;

 

View Original
Is this content helpful?

2 replies

Forum|alt.badge.img+7
  • Docusign Employee
  • 65 replies
  • Answer
  • November 7, 2024

To create the checkbox with the rule, first, create the checkbox tabs and associate them with the TabGroup through the TabGroupLabels. In the TabGroup object, you can specify the checkbox rule through the GroupRule, MinimumRequired, and MaximumReqiured properties. More information about the available value for the above properties is here: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/#schema__envelopedefinition_recipients_signers_tabs_checkboxtabs_required

C# code example below allows the recipient to select only one checkbox between 3 of them.
 

Checkbox checkbox1 = new Checkbox
{
    TabLabel = "LionTab",
    DocumentId = "1",
    PageNumber = "1",
    RecipientId = "1",
    XPosition = "200",
    YPosition = "300",
    TabGroupLabels = new List<string>
    {
        "checkboxgroup1"
    }
};
Checkbox checkbox2 = new Checkbox
{
    TabLabel = "TigerTab",
    DocumentId = "1",
    PageNumber = "1",
    RecipientId = "1",
    XPosition = "220",
    YPosition = "300",
    TabGroupLabels = new List<string>
    {
        "checkboxgroup1"
    }
};
Checkbox checkbox3 = new Checkbox
{
    TabLabel = "BearTab",
    DocumentId = "1",
    PageNumber = "1",
    RecipientId = "1",
    XPosition = "240",
    YPosition = "300",
    TabGroupLabels = new List<string>
    {
        "checkboxgroup1"
    }
};
TabGroup checkboxTabGroup = new TabGroup
{
    GroupLabel = "checkboxgroup1",
    ValidationMessage = "Please check a box",
    GroupRule = "SelectExactly",
    MinimumRequired = "1",
    MaximumAllowed = "1",
    RecipientId = "1",
    DocumentId = "1",
    PageNumber = "1",
    XPosition = "0",
    YPosition = "0",
    TabScope = "Document", // or "envelope"
    TabType = "tabgroup"
};

Tabs signer1Tabs = new Tabs
{
    SignHereTabs = new List<SignHere> { signHere1 },
    CheckboxTabs = new List<Checkbox> { checkbox1, checkbox2, checkbox3 },
    TabGroups = new List<TabGroup> { checkboxTabGroup }
};

signer1.Tabs = signer1Tabs;

 


Forum|alt.badge.img+2
  • Author
  • Newcomer
  • 1 reply
  • November 7, 2024

Thank you for the reply, It is working at the submitting of the document can we make this checkbox function like radiobutton.