问题
I am trying to get the custom fields that I have added to my template to be filled with the values I am sending in the xml request document. I am positive it is an obvious mistake, but I am just not seeing it. I also see this question askd a couple other times without an answer. this is my request. I can sign the document, but non of the non standard fields are filled.
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<status>sent</status>
<emailSubject>Disclosuresave - Clue Authorization Form</emailSubject>
<templateId>x</templateId>
<templateRoles>
<templateRole>
<email>test@test.test</email>
<name>test name</name>
<roleName>Recipient</roleName>
<clientUserId>####</clientUserId>
<CustomFields>
<CustomField>
<Name>Address</Name>
<Show>True</Show>
<Required>False</Required>
<Value>123 Ash St</Value>
</CustomField>
<CustomField>
<Name>City</Name>
<Show>True</Show>
<Required>False</Required>
<Value>Beverly Hills</Value>
</CustomField>
</CustomFields>
</templateRole>
</templateRoles>
</envelopeDefinition>
回答1:
If the fields that you're trying to fill are data fields that you've placed on the documents within the Template, then these aren't "custom fields" -- they're "tabs". If that's your scenario, then the tabs portion of your request should look like this:
<tabs>
<textTabs>
<text>
<name>Address</name>
<value>123 Ash St</value>
</text>
<text>
<name>City</name>
<value>Beverly Hills</value>
</text>
</textTabs>
</tabs>
Also, do note that element names are case-sensitive (i.e., "name" not "Name", "value" not "Value", etc.) -- AND, the value of the name element for each tab is case-sensitive as well. For example, if the Template defines the tab label as City but your API request sets name = city, then the API request won't populate that field in the Envelope (because City != city).
For future reference, this online resource contains details about request/response formats for all REST API operations in both JSON and XML: https://www.docusign.net/restapi/help.
来源:https://stackoverflow.com/questions/25315691/docusign-template-custom-field-not-being-filled