- What is TestInvite?
- Build Your First Test
- Run Your First Assessment
- Taking the Assessment
- Viewing the Results
- Question Bank Overview
- Common Question Features
- Question Types
- Creating Questions
- Organizing Questions
- Content Blocks
- Roles & Access
- Media Library
- Import & Export
- Question Submissions
- Question Bank Schema
- Browsing Questions
- Cloning Questions
- Bulk Updating Questions
- Tests Overview
- My Tests
- Creating a Test
- The Test Editor
- Test Settings
- Sections & Pages
- Adding Questions
- Page Builders
- Test Profile
- Reporting
- Test Papers
- Analytics
- Publishing a Test
- Test Library
- Marketplace
- Tasks Overview
- Creating a Task
- Task Dashboard
- Steps
- Task Settings
- Candidates
- Test Sessions
- Sent Mails
- Proctoring
- Analytics
Snippets
Snippets are reusable code assets that can be embedded into task interfaces and portal pages to extend their behavior beyond the standard configuration. There are four kinds of snippets, each serving a distinct purpose.
Data Sources
Data sources provide dynamic data that can be referenced inside task interfaces — for example, fetching a list of options to populate a question.
Templates
Templates are reusable HTML/CSS markup blocks that can be injected into task or portal page layouts.
Functions
Functions are reusable JavaScript logic blocks that can be called from within task interfaces to perform calculations or transformations.
Handlers
Handlers are event-driven code blocks that respond to specific events within a task interface, such as a candidate submitting an answer or navigating between questions.
Data sources are reusable snippets that provide dynamic data to task interfaces. Instead of hardcoding data inside a question or task, you define it once as a data source and reference it wherever needed.
Use Cases
- Populating dropdown or selection options in questions.
- Providing a shared dataset referenced across multiple questions.
- Injecting configuration values into a task interface at runtime.
Data sources are managed in Organization → Content → Snippets → Data Sources.
Templates are reusable HTML and CSS markup blocks that can be injected into task interfaces or portal pages. They let you define a consistent visual structure once and reuse it across multiple tasks.
Use Cases
- Defining a shared layout for a custom task interface.
- Injecting styled content blocks (headers, instruction panels) into multiple questions.
- Reusing a branded page section across portal pages.
Templates are managed in Organization → Content → Snippets → Templates.
Functions are reusable JavaScript logic blocks that can be called from within task interfaces. They encapsulate calculations, transformations, or validation logic that you want to share across multiple questions or tasks.
Use Cases
- Calculating a score or derived value from candidate input.
- Transforming or formatting data before it is displayed.
- Validating candidate input against custom rules.
Functions are managed in Organization → Content → Snippets → Functions.
Handlers are event-driven code blocks that execute in response to specific events within a task interface. Unlike functions (which are called explicitly), handlers are triggered automatically when a defined event occurs.
Use Cases
- Reacting when a candidate submits an answer.
- Triggering logic when a candidate navigates to a new question.
- Updating the interface state in response to candidate interactions.
Handlers are managed in Organization → Content → Snippets → Handlers.