Skip to main content
New Voice
November 5, 2024
Solved

Docusign Checkbox model

  • November 5, 2024
  • 4 replies
  • 367 views

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;

 

4 replies

Docusign Employee
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;

 

janaNew VoiceAuthor
New Voice
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.

New Voice
May 22, 2025

I do have a similar scenario in which i have two sets of “Yes” “No” checkboes.. 

I created two tabgroups  namely checkboxgroup1 and checkboxgroup2 and have 4 checkboxes as outlined below..

checkbox1 with the tablables property set to “TabGroupLabels = new List<string> { "checkboxgroup1" }”

checkbox2 with the tablables property set to “TabGroupLabels = new List<string> { "checkboxgroup1" }”

checkbox3 with the tablables property set to “TabGroupLabels = new List<string> { "checkboxgroup2" }”

checkbox4 with the tablables property set to “TabGroupLabels = new List<string> { "checkboxgroup2" }”

By having the same, it only work for the bottom group and make the first two checkboxes “optional”..

any help would be much appreciated.. 

New Voice
May 22, 2025

by not setting the “RecipientID” of those tabgroups helped me to fix the issue.. thanks..