Reference Number Template
1 Purpose
This template example is used to construct a template which then produces a document which can be used as a reference for the sc-reference-no component. The documentId of the document produced by this template (when built) is entered into the sc-reference-no 'counterDocumentId' field on the component. The name of the numeric field on the document is entered into the sc-reference-no 'counterFieldName' field on the component The fields on the document have been set to read only in the example - it is not recommended to alter the counter number value on the document.
2 Template Example
"formColor": "#1B132D",
"components": [
{
"componentName": "sc-static-html",
"name": "panelStyle",
"fullWidth": true,
"html": "<style>.panel-A {background: #ffffff;border:0px} .panel-A > .panel-heading {font-weight:normal;font-size:1.25em;height:35px;line-height:16px; color:white; background:#000000} } </style>"
},
{
"componentName": "sc-static-html",
"label": "Counter",
"name": "panelCounter",
"fullWidth": true,
"wrapAction": "open",
"wrapHtmlType": "wrap",
"wrapClass": "panel-A"
},
{
"name": "requestReferenceCounter",
"enabled": false,
"label": "Request Reference Counter",
"componentName": "sc-numeric"
},
{
"componentName": "sc-static-html",
"label": "",
"name": "panelCounter",
"wrapAction": "close",
"wrapHtmlType": "wrap"
},
{
"name": "appTags",
"value": [
"formbird",
"support",
"counter"
],
"componentName": "sc-static-value",
"visible": false
}
],
The following sc-reference-no component would be used on a second template:
{
"name": "requestReference",
"componentName": "sc-reference-no",
"label": "ID",
"counterFieldName": "requestReferenceCounter", // this is the name of the reference field on the template
"format": "R#",
"counterDocumentId": "e7156050-0ae0-11e8-a0ef-dfc5ee3ed0cc", // substitute the documentId of the document produced by the above template
},
3 Customization
The example provided may require the following fields to be changed (the list is not exhaustive, just a reminder to check some items)
1. Styling definition
2. name fields of the components - counterFieldName on the component must match the name of the numeric on the template. counterDocumentId on the component must match the documentId of the document produced by the template
3. label fields of the components
4. appTags array
5. formColor
6. format field of the component