I have a requirement where I want to display a long form to the user but split it into multiple “pages” (pagination) within a single User Task in Camunda 8.
Is it possible to configure pagination directly in Camunda Forms?
If not, how can I achieve this using form.js?
Can you please share a simple BPMN setup and example code/steps on how to build pagination in a user task form using form.js?
Any guidance, example snippets, or best practices would be really helpful.
Great question! Let me break down the pagination options available in Camunda 8 forms:
Native Camunda Forms Pagination
Short answer: Camunda Forms do not natively support multi-page/wizard-style pagination within a single User Task.
The only built-in pagination available is for the Table component, which allows you to paginate rows within a table inside your form. You can configure the number of rows per page in the Table component’s properties. However, this doesn’t split your entire form into multiple pages - it only paginates tabular data.
To achieve true multi-page forms (wizard-style) within a single User Task, you’ll need to build a custom task application using form.js. Here’s the approach:
High-Level Architecture:
Create a custom task application using React, Angular, or vanilla JavaScript
Embed form.js to render your forms
Implement custom pagination logic to manage multiple “steps” or “pages”
Handle state management between pages
Submit all collected data when the user completes the final page
<!-- Your User Task would look like this -->
<bpmn:userTask id="UserTask_MultiPageForm" name="Multi-Page Form">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:userTaskForm_1" />
</bpmn:extensionElements>
</bpmn:userTask>
Implementation Approach:
Create a custom task application that fetches tasks from Camunda
Design your form schema - you can split it into logical sections/pages
Implement pagination logic in your frontend application
Use form.js to render each “page” of your form
Manage state between pages (localStorage, component state, etc.)
Submit the complete data to Camunda when all pages are completed
Unfortunately, there are no official examples or ready-made templates for multi-page forms in the current documentation, so you’ll need to implement this custom logic yourself.
Alternative Approaches:
Multiple User Tasks: Consider splitting your long form into multiple sequential User Tasks in your BPMN process
Accordion/Collapsible sections: Use the existing form components to create collapsible sections that simulate pagination
External form integration: Use an external form solution and integrate it with Camunda via APIs
Would you like me to elaborate on any of these approaches, or do you have specific questions about implementing the custom solution?