TemplateElement
A TemplateElement is a field or other entity (text box, signature, label, checkbox) placed on a Template page. Each element is assigned to a signer via the signer index so the correct participant sees their fields.
Fields
Position & Layout
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier |
page | Int | Page number |
ax | Float | Start X coordinate |
ay | Float | Start Y coordinate |
bx | Float | End X coordinate |
by | Float | End Y coordinate |
align | String | Text alignment (left, right, centre) |
hideBorder | Boolean | Hide the field border |
fieldOrder | Int | Tab order (null = automatic flow) |
Type & Validation
| Field | Type | Description |
|---|---|---|
elementType | String! | Field type (e.g. SIGNATURE, TEXT, admin for sender fields) |
formElementType | String | Calculated form element type |
formElementDescription | String | Subtype description (e.g. "Currency") |
validation | Int | Validation rule ID |
optional | Boolean | Whether the field is optional |
substantive | Boolean | Whether the field is substantive |
Content
| Field | Type | Description |
|---|---|---|
label | String | Field label |
labelExtra | String | Additional label text |
helpText | String | Help text for the signer |
value | String | Default value |
options | String | Options (for dropdowns/radio buttons) |
Assignment
| Field | Type | Description |
|---|---|---|
signer | Int | Signer index this field is assigned to |
role | String | Role name |
Styling
| Field | Type | Description |
|---|---|---|
fontName | String | Font name |
fontSize | Int | Font size in pixels |
Logic
| Field | Type | Description |
|---|---|---|
logicGroup | String | Logic group identifier |
logicAction | Int | Logic action |
mapTo | String | Map-to field identifier |
Query
TemplateElements are accessed via Template.elementConnection:
query GetTemplateElements {
template(id: "dHBsYjQ5YTg5NWQtYWRhMy0xMWYwLWIxZGMtMDY5NzZlZmU0MzIx") {
elementConnection {
templateElements {
id
elementType
ax
ay
bx
by
page
label
optional
signer
validation
value
}
totalCount
}
}
}
Related
- Template — the template these elements belong to
- DocumentElement — the sent-document equivalent
- Role — roles determine which signer sees which elements