Collaborative Survey Filling
SurveyJS Form Library supports real-time collaborative form filling, which enables multiple participants to complete the same survey or form simultaneously. To start a session, enter your name and provide a survey JSON schema. The demo creates a room and generates a unique room ID. Open the demo in another browser tab, window, or on another device, enter the room ID, and join the session. Changes made by one participant are instantly reflected for everyone else in the session.
How It Works
- Participants connect to a shared room using a unique room identifier.
- The server maintains the survey schema and current survey data in memory.
- When a participant updates an answer, the
onValueChangedevent in SurveyJS is triggered, and the update is broadcast to other participants via Socket.IO. - Receiving clients apply the change using
survey.setValue(), keeping all survey instances synchronized. - A synchronization flag prevents incoming updates from triggering additional broadcasts and creating update loops.
- Conflicts are resolved using a last-write-wins strategy at the individual question level.
For implementation details and source code, refer to the following GitHub repository:
Collaborative Form Filling by SurveyJS
See Also
SurveyJS also supports real-time collaborative survey editing with Survey Creator. See the following demo: