Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Custom fields for text tags #59

Open
rmedcalf opened this issue Dec 13, 2018 · 3 comments
Open

Custom fields for text tags #59

rmedcalf opened this issue Dec 13, 2018 · 3 comments
Labels
enhancement legacy Related to legacy, non-OpenAPI SDK

Comments

@rmedcalf
Copy link

I'm trying to use a text tag with a preset value

In the document I have
[text-merge|req|sender|client_name|client_name]

in the C# SDK I do not see an AddCustomField method on the SignatureRequest object like I do with TemplateSignatureRequest

Instead I'm adding the fields to the CustomFields List

request.CustomFields.Add(new CustomField { Name = "client_name", Value = "My Test", ApiId = "client_name" });

However the value is not rendered in the final document

@cdfulda
Copy link

cdfulda commented Jul 25, 2019

Any update on this? I'm running into the same issue.

@Framinus
Copy link

Framinus commented Jul 25, 2019

I am creating an internal ticket to get this looked at. In the meantime, here is an example workaround using the catchall AdditionalParameters.Add() method. The AdditionalParameters.Add() method allows you to add any parameter that the API supports for an endpoint. It takes two arguments - the name of the parameter (which is "custom_fields" in this case) and a value, which is equal to a stringified array of objects. Each object represents one custom field. Every custom field has two required parameters - "name" and "value", and two optional parameters: "editor" and "required." See the signature_request/send_with_template documentation for more information on how to structure custom fields.

client.AdditionalParameters.Add("custom_fields", "[{\"name\": \"Address\", \"value\": \"123 Main Street\"},{\"name\": \"Phone\", \"value\": \"555-5555\"}]");

Please see the README for more details on how to use this method.

@ctyar
Copy link

ctyar commented Aug 11, 2020

The SDK still has this issue but the workaround works
Also, remember to remove the AdditionalParameter from the client if you re-use the client for multiple calls

client.AdditionalParameters.Remove("custom_fields");

@jtreminio-dropbox jtreminio-dropbox added the legacy Related to legacy, non-OpenAPI SDK label Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement legacy Related to legacy, non-OpenAPI SDK
Projects
None yet
Development

No branches or pull requests

6 participants