Typed builders for BoldSign text-tag form-field definitions.
BoldSign can place form fields from text tags: put a {{definition_id}}
placeholder in the document, then send a matching textTagDefinitions entry
(with useTextTags: true) so BoldSign replaces the placeholder with a typed
field. This module builds those entries so callers do not have to hand-write
the field-type strings ("Signature", "DateSigned", ...) or the payload
shape.
Example
pdf # ...contains "{{sign_here}}" and "{{date_here}}"
Boldsign.Document.send(client, %{
title: "Agreement",
files: [Boldsign.File.from_binary(pdf, "agreement.pdf", "application/pdf")],
signers: [%{name: "Ada", emailAddress: "ada@example.com", signerType: "Signer"}],
useTextTags: true,
textTagDefinitions: [
Boldsign.TextTag.signature("sign_here", signer_index: 1),
Boldsign.TextTag.date_signed("date_here", signer_index: 1)
]
})Each definition_id must appear verbatim in the document as {{definition_id}}.
Summary
Functions
Builds a definition for any BoldSign field type string. Use the typed
helpers above for the common cases; this is the escape hatch for others.
A checkbox field.
A date-signed field (auto-filled by BoldSign with the signing date).
An initials field.
A signature field anchored at the {{definition_id}} placeholder.
A free-text field the signer fills in.
Types
@type opts() :: [signer_index: pos_integer(), size: map() | {number(), number()}]
Options: :signer_index (1-based, default 1) and :size (%{width:, height:} or {w, h}).
Functions
Builds a definition for any BoldSign field type string. Use the typed
helpers above for the common cases; this is the escape hatch for others.
A checkbox field.
A date-signed field (auto-filled by BoldSign with the signing date).
An initials field.
A signature field anchored at the {{definition_id}} placeholder.
A free-text field the signer fills in.