Search code examples
docusignapidocusignapextoolkit

How can I attach a Custom Tab to a Docusign Envelope?


Looking through the Docusign API documentation I am unable to figure out how to attach a Custom Tab to an Envelope. Using the traditional tabs sometimes forbid me from setting the text. Hence, the need for a Custom Tab. Using the CustomTabsAPI I can create a Custom Tab. What remains is the ability to attach the Custom Tab to the envelope.

You can add custom tabs to envelopes and templates by setting the customTabId property when creating an envelope, template recipient, or when adding a new tab for an existing recipient.

I am using the EnvelopeDefinition to create my envelope. I was expecting something like:

envelope_definition = EnvelopeDefinition(
        custom_fields=custom_fields,
        documents=documents,
        recipients=recipients,
        status='created',
        event_notification=event_notification,
        email_settings=email_settings,
        custom_tabs=custom_tabs # <------ SOMETHING LIKE THIS
    )

Any suggestions? An example of how to add custom tabs? Documentation? TIA

EDIT: Here is the textTab I currently have in place

signer = Signer(**args)
title_text = Text(
                anchor_string=anchor_string, 
                anchor_units="pixels", anchor_y_offset="10",
                anchor_x_offset="0", width="180", value=initial_value
            )
signer.tabs = Tabs(text_tabs=[title_text])

example img of text not editable

example img of custom tab this can be edited

If I can get the TextTab to be edited, that would be great.


Solution

  • Summary of the solution:

    The title tab is a system tab so the value can't be set.

    Instead, the OP will use a text tab, set its value, and set the attribute locked to false to enable the signers to update it.