问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/36458832/docusign-radio-group-pre-fill-issues-using-api