Document Field Type

Description:
The document field type allows users to attach, view, and manage documents directly within a case. This field provides an interface to interact with documents stored in Caseblocks, enhancing the ability to associate relevant files with specific cases. Users can upload new documents, select from existing attachments, and perform actions such as viewing, downloading, or removing documents associated with the field.


YAML Definition

- name: contract_document
  type: document
  display_name: "Contract Document"
  guidance: "Attach the signed contract document."
  required: true
  allow_select_multiple: false
  readonly: false

Attributes

  • name (string): Required.
    The unique identifier for the field.

  • type (string): Required.
    Must be set to document for document fields.

  • display_name (string): Optional.
    The label displayed in the user interface. If not provided, a formatted version of name is used.

  • guidance (string): Optional.
    Help text or instructions for the field, assisting users in understanding what document to attach.

  • required (boolean): Optional.
    If true, the field must have a document attached before submission.

  • allow_select_multiple (boolean): Optional.
    If true, allows multiple documents to be attached to this field. Defaults to false.

  • readonly (boolean): Optional.
    If true, the field is read-only and users cannot modify the attached document(s).

  • hidden (boolean): Optional.
    If true, the field is hidden from the user interface.


Example

- name: supporting_documents
  type: document
  display_name: "Supporting Documents"
  guidance: "Upload any supporting documents relevant to this case."
  required: false
  allow_select_multiple: true

In this example:

  • supporting_documents: Allows users to attach multiple documents that support the case.
  • allow_select_multiple: Set to true, enabling multiple file attachments.
  • guidance: Informs the user about the purpose of the field.

Usage Notes

  • User Interaction:
    • Users can attach documents directly to the field by selecting from existing attachments or uploading new files.
    • The field provides options to view, download, or remove attached documents.
    • If allow_select_multiple is false, only one document can be attached at a time.
  • Document Management:
    • Documents attached via the field are stored within the case in Caseblocks.
    • Users can access these documents through the field or via the case’s documents tab/menu option.
  • Required Fields:
    • If the field is marked as required, ensure that validation checks for at least one document attached before submission.
  • Readonly Fields:
    • Setting readonly to true prevents users from modifying the attached documents, which is useful for preserving records or when documents are managed by the system.
  • Guidance and Labels:
    • Use display_name to provide a clear label for the field.
    • The guidance attribute helps users understand what type of document(s) should be attached.
  • Multiple Attachments:
    • When allow_select_multiple is true, the field can hold multiple documents.
    • The user interface should allow users to add or remove documents individually.
  • Accessing Documents:
    • Users can open documents in a new tab or download them directly from the field.
    • Documents can also be viewed within the case’s documents section for broader context or additional actions.
  • Use Cases:
    • Contracts: Attaching signed contracts or agreements to a case.
    • Evidence: Uploading evidence or supporting materials in legal or investigative cases.
    • Reports: Including reports, analyses, or official documents relevant to the case.
  • Security and Permissions:
    • Ensure that appropriate permissions are set so that only authorized users can view or modify documents.
    • Sensitive documents should be handled in compliance with data protection regulations.
  • File Types and Size Limits:
    • Consider specifying acceptable file types and size limits to manage storage and ensure compatibility.
  • Integration with Caseblocks:
    • Documents attached through the field are integrated with Caseblocks’ document management system, providing centralized access and management.

By incorporating the document field type into your schema, you enhance the functionality of your application by allowing users to associate important files directly with cases. This streamlines workflows, improves data organization, and facilitates better collaboration and record-keeping within your Caseblocks application.


Copyright © 2024 Caseblocks Limited.