Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

docusignapi - Pre-populating Template Default Tabs with REST API

Unable to pre-populate default tabs for Company and Title, but textTabs user_name works just fine. I can also change locked property of the fields but not the value.

params = {
    "accountId" : ACCOUNT_ID,
    "emailSubject": "Test Sign",
    "emailBlurb": "Auto generated",
    "templateId": POWERFORM_ID,
    "templateRoles": [{
        "clientUserId" : str(user_id),
        "roleName": "Recipient",
        "name": name,
        "email": email,
        'company': 'test',
        'Company': 'test21',
        "tabs": {
            "companyTabs": [{
                "tabLabel": "Company",
                "value": 'this is a test',
            }],
            "textTabs": [{
                "tabLabel": "user_name",
                "value": user_name,
            }],
            "titleTabs": [{
                  "value": title,
                  "required": "true",
                  "tabLabel": "Title",
            }],
        },
  }],
  "status":"sent"
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The Original Poster is correct in his answer. I'm expanding on it:

The list of tabs and their descriptions.

Some tabs enable values to be entered by the signer. Those tabs' values can be preset either through the web browser or via the API.

Other tab types use information that is already "known" by the DocuSign platform. These tabs cannot have their value updated on a per-tab basis by the API or via the browser. In some cases, the info might be settable using a different technique. Eg, the Full name tab uses the signer's name, which is set elsewhere in the request.

Here is the list of tabs and whether you can set their values in the tab definition or not:

  • Approve Tab: [Can’t set value] Place this tab on the document where you want the recipient to approve documents in an envelope without placing a signature or initials on the document. If the recipient clicks the Approve tab during the signing process, the recipient is considered to have signed the document. No information is shown on the document for the approval, but it is recorded as a signature in the envelope history.
  • Checkbox Tab: [Can set value] Place this tab on the document in a location where the recipient can select a yes/no (on/off) type option.
  • Company Tab: [Can’t set value] Place this tab on the document where you want the recipient’s company name to appear.
  • Date Signed Tab: [Can’t set value] Place this tab on the document where you want the date the recipient signed the document to automatically appear.
  • Date Tab: [Can set value] Place this tab on the document where you want the recipient to enter a date. Date tabs are single-line fields that allow date information to be entered in any format. The tooltip for this tab recommends entering the date as MM/DD/YYYY, but this is not enforced. The format entered by the signer is retained. If you need a particular date format enforced, DocuSign recommends using a Text tab with a Validation Pattern and Validation Message to enforce the format.
  • Decline Tab: [Can’t set value] Place this tab on the document where you want to give the recipient the option of declining an envelope. If the recipient clicks the Decline tab during the signing process, the envelope is voided.
  • Email Tab: [Can set value] This is a single-line fields that accepts any characters.
  • Email Address Tab: [Can’t set value] Place this tab on a document where you want the recipient's email, as entered in the recipient information, to appear.
  • Envelope ID Tab: [Can’t set value] Place this tab on the document where you want the envelope ID for to appear. Recipients cannot enter or change the information in this tab, it is for informational purposes only.
  • First Name Tab: [Can’t set value] Place this tab on a document where you want the recipient's first name to appear. This tab takes the recipient's name, as entered in the recipient information, splits it into sections based on spaces and uses the first section as the first name.
  • Formula Tab: [Can set value (via formula field)] This tab is used to add a calculated field to a document. Envelope recipients cannot directly enter information into the tab; the formula tab calculates and displays a new value when changes are made to the reference tab values. The reference tab information and calculation operations are entered in the "formula" element. See the Using the Calculated Fields Feature quick start guide or DocuSign Service User Guide for more information about formulas.
  • Full Name Tab: [Can’t set value] Place this tab on the document where you want the recipient’s name to appear.
  • Initial Here Tab: [Can’t set value] Place this tab where the recipient must initial the document. This tab can be set to be optional.
  • Last Name Tab: [Can’t set value] Place this tab on a document where you want the recipient's last name to appear. This tab takes the recipient's name, as entered in the recipient information, splits it into sections based on spaces and uses the last section as the last name.
  • List Tab: [Can set value] This tab has a list of options that a recipient can select. The listItems parameter is used to set the options that can be selected.
  • Note Tab: [Can set value] Place this tab on the document where you want to add a note for the recipient on a document.
  • Number Tab: [Can set value] This tab is a field where the recipient can enter numbers and decimal (.) points.
  • Radio Group Tab: [Can set value] This group tab is used to place radio buttons on a document. The radios parameter is used to add and place the radio buttons associated with the group and only one radio button can be selected in a group.
  • Sign Here Tab: [Can’t set value] Place this tab where the recipient must sign the document. This tab can be set to be optional.
  • Signer Attachment Tab: [Can’t set value] The signer attachment is where the recipient initiates the process of adding supporting documents to an envelope.
  • SSN Tab: [Can set value] This tab is a single-line field where the recipient can enter numbers. A SSN can be typed with or without dashes.
  • Text Tab: [Can set value] This tab is a field where the recipient can enter any type of characters.
  • Title Tab: [Can’t set value] Place this tab on the document where you want the recipient’s title to appear.
  • Zip Tab: [Can set value] This tab is a single-line field where the recipient can enter numbers.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...