Working with Forms in tSM
Forms are one of the foundational building blocks of the tSM platform. They allow users to create, view, and edit data using visual components that are tightly integrated with tSM’s data model, characteristics system, business processes, and runtime context.
This section of the documentation helps you understand how forms work — both from a technical and functional perspective — and how to configure them effectively and efficiently.
What is a Form in tSM?
A form in tSM is not just a UI screen. It is a dynamic interface that connects:
- Entities (e.g., tickets, customers, orders)
- Characteristics (custom fields, metadata)
- Configuration Profiles (visibility, layout, structure)
- Processes and Business Logic (automations, validations)
- Scripting (for dynamic behaviors and backend logic)
Think of a form as a bridge between user interaction and backend configuration.
Design-Time vs. Runtime
Design-Time | Runtime |
---|---|
Form Designer (drag-and-drop UI) | Form engine in production |
$context not available | $context.form, $context.entity, etc. |
Visual layout and static defaults | Live data, dynamic values, scripts |
Widget configuration | Execution of conditions and logic |
This distinction is key. Some logic or scripts may not behave as expected in the designer but will work correctly in the runtime context.
How Forms Work – High-Level Architecture
- Form Profile defines the layout and UI structure
- Characteristics define the data fields available on the entity
- JSON Schema binds layout and data types
- Widget Configuration defines UI rendering and validation
- Scripting (JEXL/SpEL) allows dynamic behavior and automation
- Processes can be linked to forms for backend integration
Each form is stored as metadata, allowing it to evolve as your business logic changes — without hardcoding UI.
Key Features and Capabilities
- Modular widget-based form layout
- Dynamic logic via JEXL expressions
- Advanced validation and conditional rendering
- Integration with tSM processes and APIs
- Entity-bound data persistence
- Real-time behavior using
$context
at runtime - Forms as part of versioned configuration layers
What You'll Learn in This Section
- How to build forms using the Form Designer
- How to configure layout and behavior using JSON Schema
- How to add conditional logic using JEXL
- How to use backend scripting via SpEL
- How to optimize forms for performance and maintainability
- How to connect forms to entities, processes, and data sources