- Templates within Box Sign
- Templates with tags embedded in base files
About template tags
With template tags, you can embed custom tags or text in the base files of a signature request or reusable template. Add the tags in an editor such as Microsoft Word, Google Docs, PowerPoint, or Adobe Acrobat. Box Sign automatically recognizes the embedded tags and converts them into fillable and signable fields. You can use template tags through the Box Sign API, the Salesforce integration (through the Box for Salesforce managed package), and the document preparation view in the Box Sign web app.Creating a template with tags
To create a template with tags:- Open your document in your preferred text editor (for example, Microsoft Word, Google Docs, PowerPoint, or any PDF reader).
- Determine how many people will sign the document and identify which recipient number each person will be assigned. This helps you plan which tags to use for each signer. See Recipient numbering for details on how recipient numbers work.
- Add special tags to each corresponding input field where you want signers to fill out information or sign. See the Available field tags section for details.
- Adjust the display size:
- Set the font size for the tag.
- Add spaces before the closing
]]brackets. Each space increases the field width. For example:[[s1|0 ]].
- Change the font color of the tags to white to hide them from view in the final document.
- Save and upload your document to Box Sign.
Best practices
- Keep distance between tags, preferably by using line breaks or proper line height.
- Place tags in a table format or use a different text style than the body of the document for better positioning.
- Test your template tags before you send the document to signers.
Tag syntax
All template tags follow this basic format:[[field_type|recipient_number|optional_parameters]]
Where:
field_typeis the type of field (signature, text, date, and so on)recipient_numberidentifies which recipient the field is assigned tooptional_parametersadd additional settings like validation or requirements
Recipient numbering
Recipient numbers link each tag to a recipient:0is reserved for the sender. Start numbering with0if the sender signs the document.- If the sender doesn’t sign, start numbering with
1. Your document must not contain|0tags. 1,2,3, and so on refer to recipients in the order you add them to the signature request.- Recipient numbers in tags correspond to the order you add recipients, not the signing order.
If you send signature requests with template tags through the Box API, see Signing structured docs in the Box developer documentation for API-specific numbering rules.
[[s|0]]for signature[[s|1]]for signature[[s|2]]for signature
[[s|0]] tags. The first and second recipients you add are assigned to the [[s|1]] and [[s|2]] tags.
Example: Recipient order vs. signing order
Let’s say you create a document with these tags:
[[s|1]]for signature[[s|2]]for signature[[s|3]]for signature
- alice@example.com → automatically assigned to
[[s|1]]tags - bob@example.com → automatically assigned to
[[s|2]]tags - charlie@example.com → automatically assigned to
[[s|3]]tags
- First to sign: charlie@example.com (but still assigned to
|3tags) - Second to sign: alice@example.com (but still assigned to
|1tags) - Third to sign: bob@example.com (but still assigned to
|2tags)
[[s|3]] fields, then Alice signs and completes the [[s|1]] fields, and finally Bob signs and completes the [[s|2]] fields. The tag numbers stay tied to the order recipients were added, regardless of who signs first.
For more information and examples, see the Working with multiple signers section.
Available field tags
The table below lists all available template tags for Box Sign templates.
*Text input fields support additional validation tags to control data format. See Text input validation tags for options including numbers, email, dates, ZIP codes, SSN, and custom patterns.
Box Sign doesn’t support template tags for radio and dropdown fields.
Box Sign fills in Date signed
[[d|1]] and Email [[e|1]] automatically, with the signing date and the signer’s email address. Signers can’t edit these fields.Text input validation tags
You can add validation to text input fields to control what type of data signers can enter. This helps ensure data accuracy and reduces errors. To learn more, see Using input text validation. All text input validation tags are required by default. Use|r:0 to make them optional. See Optional template tag parameters for more information and examples.
Optional template tag parameters
Use optional parameters to make fields optional or required and to configure other field settings. Add parameters after the recipient number, separated by the pipe symbol|.
Making a field optional or required
- Text input, checkboxes, and signature fields are required by default but can be made optional.
- Date and email fields are read-only and cannot be configured as optional or required.
- All other field types can be configured as optional or required.
|r:0(optional)|r:1(required)
- Optional text field:
[[t|1|r:0]] - Optional checkbox:
[[c|1|r:0]]
Adding field names or descriptions
Add a name to fields to provide context for signers. The name replaces the default placeholder text. Syntax:|n:field_name
Examples:
- Text field with name:
[[t|1|n:Employee Name]] - Optional text field with name:
[[t|1|r:0|n:Middle Name]]
Pre-filled date and email fields
The date field is pre-filled with the signing date and the email field is pre-filled with the signer’s email address.Making a field read-only
To lock the content from being modified by signers, senders can mark fields as read-only. Syntax:|ro:1
Supported fields:
- Name
- Text Input
- Company
- Title
- Checkbox
- Read-only text field:
[[t|1|ro:1]] - Read-only name field:
[[n|1|ro:1]]
Adding an external identifier to a field
An external identifier gives a field a name you can refer to outside the document. Use it to:- Prefill the field with data from another application. See Prefilling fields through the API.
- Export signer data to Excel. Each column in the export is labeled with the field’s external identifier, so you can match what signers entered to your own records.
|id:identifier_name
Examples:
- Text field with external identifier:
[[t|1|id:employee_id]] - Text field with validation and external identifier:
[[t|1|v:e|id:contact_email]]
Making a text field multi-line
By default, text fields are single-line. Add multi-line text entry to support longer responses like comments, descriptions, or addresses. Syntax:|m:1
Example:
- Multi-line text field with name:
[[t|1|m:1| id:contact_name]]
Prefilling fields through the API
If you send signature requests with the Box Sign API, you can fill in fields with different values for each request without editing the document.1
Add a tag with an ID to your document
Add
|id: to any tag you want to prefill. For example: [[n|1|id:signer_name]]2
Pass the value when you create the request
In
POST /sign_requests, add a prefill_tags entry. Set document_tag_id to the ID from step 1:Working with multiple signers
Example 1: Three signers, including the sender
If you are the sender and also need to sign:- You are automatically assigned to
|0tags (sender) - First recipient gets
|1tags - Second recipient gets
|2tags
- Your signature:
[[s|0]] - First signer’s signature:
[[s|1]] - Second signer’s signature:
[[s|2]]
Example 2: Two external signers only
If you are only the sender and do not need to sign:- Do not use
|0tags - First recipient gets
|1tags - Second recipient gets
|2tags
- First signer’s signature:
[[s|1]] - Second signer’s signature:
[[s|2]]