Use field components in cells to display a field label and content, vertically (field label above content) and horizontally (field label beside content). The content can be plain text, tokens, Markdown text, or combination thereof, that display database data specific to the invoice. Content examples are shown in the following table.
Data examples | JSON | Output |
---|---|---|
Text (simple binding) | "Thank you for your business." | Thank you for your business. |
Data (simple binding) | {{Invoice Due Date}} | July 1, 2019 |
Text and data (compound binding) | "Due date: {{Invoice Due Date}}" | Due date: July 1, 2019 |
Markdown text (double asterisks render output bold) | "**Thank you for your business.**" | Thank you for your business. |
Note: You can create more than one active version of an invoice template per locale, and use conditional expressions to determine which fields appear on a version of an invoice template. You can only use conditional expressions in templates that you create or that you copy from a marketplace-provided default template. You cannot add conditional expressions to marketplace default templates. For more information, see Build field components.
You can add field components to cell components. See Build cell components.
In the Appdirect Template_EN_US default template, see lines 799-829.
To download the default template, go to .
{ "type": "field", "style": {}, "properties": { "visible": <true | false> "orientation": "<vertical | horizontal>" }, "label": { "type": "text", "style": {}, "properties": { "visible": <true | false> }, "data": "<label value>" }, "content": { "type": "text", "style": {}, "properties": { "visible": <true | false> }, "data": "<plain text | {{token}} | {{markdownText}}>" } }
Element | Type | Description | |||
---|---|---|---|---|---|
field | object | Defines the styles, behaviors, and content for field components. | |||
type | string |
Required. Defines the component type as field. Valid value: field |
|||
properties | object | Required. Define visibility. | |||
visible | boolean |
Required. Defines whether component appears on invoices. Valid values: true | false |
|||
orientation | string |
Field orientation: Vertical—Label is above content. Horizontal—Label is next to content. Valid values: vertical | horizontal |
|||
style | object |
Required. Defines formatting for the field. Valid values: HTML element names and CSS styles for the named HTML element. All HTML styles. Only relevant styles that the Invoice Builder can render appear in the user interface preview and the PDF. |
|||
label | object |
Required. Defines the styles, behaviors, and content for field label. |
|||
type | string |
Defines the component type as text or Markdown text. Valid values: text | markdownText |
|||
style | object |
Defines the formatting for the label. Valid values: HTML element names and CSS styles for the named HTML element. All HTML styles. Only relevant styles that the Invoice Builder can render appear in the user interface preview and the PDF. Note that Examples: "width": "50%" "text-align": "left" |
|||
properties | object | Define visibility. | |||
visible | boolean |
Defines whether component appears on invoices. Valid values: true | false |
|||
data | text |
Content to display for the field label. Valid values: Text or Markdown text. Examples (for the latter, Markdown asterisks render output italicized): Payment terms *Invoice number* |
|||
content | object |
Required. Defines the styles, behaviors, and content for field content. |
|||
type | string |
Defines the component type as content. Valid values: text | markdownText |
|||
style | object |
Defines formatting for the content. Valid values: HTML element names and CSS styles for the named HTML element. All HTML styles. Only relevant styles that the Invoice Builder can render appear in the user interface preview and the PDF. Note that Examples: "width": "50%" "text-align": "right" |
|||
properties | object | Define visibility. | |||
visible | boolean |
Defines whether component appears on invoices. Valid values: true | false |
|||
data | text |
Content to display for the field label. Valid values: plain text or tokens. See Tokens. Examples: Net 30 {{Invoice Number}} |