PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, August 26, 2022

[FIXED] How can you pre-fill form data before creating/sending an envelope when using templates

 August 26, 2022     docusignapi     No comments   

Issue

I want to prefill some fields that are included on the template level.

Lets say, for example, that I want to prefill the employee name and some other info from our application's existing records before sending out the document included in the template to be signed.

How could I get a list of all the form fields.

With pdfs I normally use the itextSharp library to get all the AcroField (pdf form fields) for a given fileName and set them to whatever values I want using the SetField() method.

I'm looking for a way to do something similar with files hosted in DocuSign

Could be I'm missing something very obvious

Thanks in advance for any help


Solution

We have a step-by-step code example showing you how to do exactly this.

The JSON will look something like this:

"templateId": "9e35d343-6942-4756-b7aa-XXXXXXXX",
    "templateRoles": [{
        "email": "joe.doe@doooeeee.com",
        "name": "Joe Doe",
        "roleName": "employee",
        "tabs": {
            "checkboxTabs": [{
                "selected": "true",
                "tabLabel": "ckAuthorization"
            }, {
                "selected": "true",
                "tabLabel": "ckAgreement"
            }],
            "listTabs": [{
                "documentId": "1",
                "pageNumber": "1",
                "tabLabel": "list",
                "value": "green"
            }],
            "radioGroupTabs": [{
                "groupName": "radio1",
                "radios": [{
                    "selected": "true",
                    "value": "white"
                }]
            }],
            "textTabs": [{
                "tabLabel": "text",
                "value": "Jabberywocky!"
            }, {

        // .....


Answered By - Inbar Gazit
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing