LilRazi
LilRazi

Reputation: 760

Not able to pre populate the custom field using c# code in HelloSign

I was trying to pre-populate the custom field value from C# code but I was not able to. I have used following snippet of code to do so

        var client = new Client("MY API KEY");
        var request = new TemplateSignatureRequest();
        request.AddTemplate("docID");
        request.Title = "Test Titel";
        request.Subject = "Test Subject";
        request.Message = "Test Message.";
        request.AddSigner("Me", "[email protected]", "Test");
        request.AddSigner("Client", "[email protected]", "Test");
        var firstName = request.GetCustomField("FirstName");
        firstName.Value = "John";
        request.TestMode = true;
        var response = client.SendSignatureRequest(request);

I have already assigned the customer field to me and verified the API ID key for the field also.But still not able to get the result. Is there anything else we need to add to so that value John will be shown.

Upvotes: 1

Views: 167

Answers (1)

alexmac05
alexmac05

Reputation: 56

Try request.AddCustomField("fName", "Alex");

Also, please feel free to reach out to [email protected] for more assistance if you would like.

Upvotes: 2

Related Questions