Forms & Documents
Collect responses with forms and render reusable document templates. This guide follows version 3.1.7 (03acdf712c).
For embedding a form on a website, see Messenger Installation.
Forms
backend/core-api/src/modules/forms/ (graphql/schema/{index,fields}.ts, db/definitions/{forms,fields}.ts, db/models/Forms.ts, trpc/fields*.ts):
- A form defines
name,title,code,type,tagIds,departmentIds,brandId,leadData, andintegrationId. - Field rules, lead load types, and success actions are part of the schema. Leads created from Frontline forms flow into the inbox pipeline.
Create one form per purpose (contact, lead, feedback) so submissions, tags, and notifications stay separable.
Documents
backend/core-api/src/modules/documents/ (graphql/schema.ts, queries.ts, mutations.ts, db/models/Documents.ts, trpc/document.ts, routes.ts, blocksToHtml.ts, barcode.ts):
- A document defines
contentType,subType,name,tagIds,content,replacer, andcode. blocksToHtmland barcode helpers render printable output;routes.tsserves print and download flows.
Keep replacers explicit ({{ customer.name }}-style placeholders depend on the module's replacer map) and test with missing optional fields before publishing.
Verify
- Create a form, submit a test response, and confirm it appears in the expected inbox or lead list.
- Create a document template, render it with a representative record, and check empty-field behavior.
- Confirm permissions: only authorized roles can edit the template, while submissions follow the form's own access rules.