Hi all,
Background: I have a template in DocuSign, which includes several text input fields (for signers to fill in text) and some radio button groups (for signers to select one button per group).
I understand how to prefill values into text input fields/tabs. Essentially, you call restapi/v2.1/accounts/{AccountID}/envelopes/{EnvelopeID}/recipients/{RecipientID}/tabs and include textTabs in your request body (refer to the screenshot below).
However, my question is: how do you prefill values into radio button groups?
Hi,
Can you show the screenshot of your template with the radio Button group, I believe static values can be assigned to it in the Template itself.
Hi Abhishek thanks for responding.
This is what I have on DocuSign's side:
You need to add an extra tag to your request -
<radioGroupTabs>
<radioGroup>
<groupName>Radio Group 1</groupName>
<radios>
<radio>
<selected>True</selected>
<value>Radio 1</value>
</radio>
<selected>False</selected>
<value>Radio 2</value>
</radios>
</radioGroup>
</radioGroupTabs>
refer to this link https://stackoverflow.com/questions/19530751/docusign-api-pre-filling-radio-group-tabs-for-template
You might need to add structure inside the tabs Structure that is there in the send Action.
Thanks, Abhishek. It is working now. Detailing my steps here for others to refer:
1. Create a radio group in the template in the DocuSign portal, give this group a group label/name, and fill in the radio button value for each radio button.
2. On the OutSystems side, build a list of RadioGroupTabs just like how you built your list of TextTabs. At this point, appending the radio group to the RadioGroupTabs list will do; leave the radio buttons for later. When appending the group, leave radios empty and enter document ID, recipient ID, group name (match above), and value (this is the radio button value above which you should enclose in an if/else or a switch).
3. After you call the API to get the tabs from the template in the DocuSign portal (get restapi/v2.1/accounts/{AccountID}/envelopes/{EnvelopeID}/documents/{DocumentID}/tabs), look into the DocuSign radio groups and radio buttons until you find the DocuSign radio button whose value matches the value you conditionally assigned to the OutSystems radio group in step 2. This can be done by looping through DocuSign groups then OutSystems groups then DocuSign buttons. Then, you append an OutSystems radio button to your OutSystems radio group using the DocuSign radio button values – copy tab ID and value over, selected should be "true" since this button value matches the group value which is in turn the preferred answer.
4. Once the list of TextTabs and RadioGroupTabs have been built, call the API to prefill the template (put restapi/v2.1/accounts/{AccountID}/envelopes/{EnvelopeID}/recipients/{RecipientID}/tabs).