使用REST API预先填充模板默认选项卡
无法预填充公司和标题的默认选项卡,但是textTabs user_name可以正常工作。我还可以更改字段的锁定属性,但不能更改值。
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"
}
原始海报的答案是正确的。我正在对此进行扩展:
The Original Poster is correct in his answer. I'm expanding on it:
The list of tabs and their descriptions.
某些选项卡允许签名者输入值。这些标签的值可以通过Web浏览器或通过API进行预设。
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.
其他标签类型使用DocuSign平台已经知道的信息。这些选项卡的值不能通过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:
-
批准选项卡
:[ 无法设置值]将此标签放在文档上您希望收件人批准信封中的文档的位置,而无需在文档上签名或缩写。如果收件人在签名过程中单击批准选项卡,则认为该收件人已签署了文档。在文档中未显示任何要批准的信息,但在信封历史记录中将其记录为签名。 -
复选框选项卡
: [可以设置值]将此选项卡放置在文档上收件人可以选择是/否(打开/关闭)类型选项的位置。 -
公司选项卡
:[不能设置值]将此标签放在文档中您希望收件人的公司名称出现的位置。 -
日期签名选项卡
:[不能设置值]将此选项卡放置在文档上您希望收件人签署文档的日期自动出现的位置。 -
日期选项卡
:[可以设置值]将此选项卡放在您希望收件人输入日期的文档上。日期选项卡是单行字段,允许以任何格式输入日期信息。此选项卡的工具提示建议将日期输入为MM / DD / YYYY,但这不是强制性的。签名人输入的格式将保留。如果需要强制使用特定的日期格式,DocuSign建议使用带有验证模式和验证消息的文本选项卡来实施该格式。 -
拒绝选项卡
:[不能设置值]将此标签放在文档上您希望收件人选择拒绝信封的位置。如果收件人在签名过程中单击拒绝选项卡,则信封将作废。 -
电子邮件选项卡
:[可以设置值]是一个接受任何字符的单行字段。 -
电子邮件地址标签
:[不能设置值]将此选项卡放在要在收件人信息中显示的收件人电子邮件的文档上。 -
信封ID选项卡
:[不能设置值]将此标签放在您要显示信封ID的文档上。收件人无法在此选项卡中输入或更改信息,仅供参考。 -
名字选项卡
:[无法设置值]将此标签放在您想显示收件人名字的文档上。此选项卡接受在收件人信息中输入的收件人姓名,根据空格将其分为多个部分,并使用第一部分作为名字。 -
公式选项卡
:[可以设置值(通过公式字段)]此选项卡用于将计算出的字段添加到文档中。信封收件人不能直接在选项卡中输入信息。更改参考标签值后,公式标签会计算并显示新值。在公式元素中输入参考选项卡信息和计算操作。有关公式的更多信息,请参见《使用计算字段功能》快速入门指南或DocuSign服务用户指南。 -
全名选项卡
:[ 无法设置值]将此标签放在文档中您希望收件人姓名出现的位置。 -
此处初始标签
:[不能设置值]将此选项卡放在收件人必须在其上初始化文档的位置。此标签可以设置为可选。 -
姓氏标签
:[不能设置值]将此选项卡放在您要显示收件人姓氏的文档上。此选项卡采用在收件人信息中输入的收件人名称,根据空格将其分为多个部分,并使用最后一部分作为姓氏。 -
列表选项卡
:[可以设置值]此选项卡具有收件人可以选择的选项列表。 listItems参数用于设置可以选择的选项。 -
注释选项卡
:[可以设置值]将此选项卡放在 -
数字选项卡
:[可以设置值]此选项卡是收件人可以在其中输入数字和小数点(。)点的字段。 -
无线电组选项卡
:[可以设置值]组选项卡用于将单选按钮放置在文档上。 radios参数用于添加和放置与该组关联的单选按钮,并且在组中只能选择一个单选按钮。 -
在此处签名选项卡
:[不能设置值]将此标签放在收件人必须在文档上签名的位置。此标签可以设置为可选。 -
签名附件标签
:[不能设置值]签名者的附件是收件人启动将支持文档添加到信封的过程。 -
SSN选项卡
:[可以设置值]此选项卡是一个单行字段,收件人可以在其中输入数字。可以键入SSN,带或不带破折号。 -
文本选项卡
:[可以设置值]此选项卡是收件人所在的字段可以输入任何类型的字符。 -
标题标签
:[不能设置值] -
Zip选项卡
:[可以设置值]此选项卡是单个行字段,收件人可以在其中输入数字。
-
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.