Smith
Smith

Reputation: 23

Docusign Radio group pre-fill issues using api

I am trying to pre-select a radio button group using api. however the generated document doesn't seem to have any radio button selected.

Sample:

Radio radVal1 = new Radio();
radVal1.setSelected("True");
radVal1.setValue("ChoiceYes");

Radio radVal2 = new Radio();
radVal2.setSelected("False");
radVal2.setValue("ChoiceNo");

List<Radio> radioVals = new ArrayList<Radio>();
radioVals.add(radVal1);
radioVals.add(radVal2);

RadioGroup rgrp = new RadioGroup();
rgrp.setGroupName("RadioGroup4");
rgrp.setRadios(radioVals);

List<RadioGroup> radioGroupTabs= new ArrayList<RadioGroup>();
radioGroupTabs.add(rgrp);

Tabs entityTabs = new Tabs();
entityTabs.setRadioGroupTabs(radioGroupTabs);

I am using a template with radio buttons with

Group Label : RadioGroup4

Button Values:

ChoiceYes ChoiceNo

No other conditional logic.

Upvotes: 2

Views: 440

Answers (1)

Ergin
Ergin

Reputation: 9356

Looks like you've resolved your own issue, to make clear for the community the groupName string must exactly match the name you pass through the API, otherwise it will not be able to match to the radios.

Upvotes: 1

Related Questions