Everright FormEditor: A Vue3‑Based Visual Form Builder – Features and Implementation Details
Everright FormEditor is a Vue3 visual form editor built on element‑plus and Vant that offers flexible drag‑and‑drop, a rich set of field types, layout containers, internationalization, dual modes, and an internal architecture comprising Fields, Canvas, Selection, Config panels, adapters, and a Node.js backend for persistence.
Everright FormEditor is an open‑source visual form editor built with Vue3, leveraging element‑plus for PC and Vant for mobile. It provides flexible drag‑and‑drop, numerous field types (text, email, date, rating, etc.), layout containers (grid, table, tabs, collapse), built‑in internationalization, and two operating modes (layout‑field coupled or separated).
The core element is the Field , which represents both form fields and layout containers. Fields are placed on a Canvas that stores data as a two‑dimensional array Array[r][c] , allowing nested layout containers.
When a field is added to the Canvas, it is automatically wrapped by a Selection component that enables dragging, resizing, deletion, and parent selection. Selecting a field highlights it on the Canvas and displays its full property set in the Config panel.
The Adapter layer reconciles differing parameter names between element‑plus and Vant; for example, the rating component uses max on element‑plus and count on Vant. Sample adapter code:
if (!isPc) {
result.count = options.max
} else {
result.max = options.max
}Two editor modes are supported: layoutType1 where layout and fields are not separated (PC design auto‑adapts to mobile), and layoutType2 where they are separated, allowing independent modifications on each platform while keeping field properties synchronized.
Drag‑and‑drop behavior relies on sortablejs with a custom plugin that intercepts dragOver and drop events to decide whether to insert a row (wrapping the element in an inline container) or a column.
During development a Node.js service with SQLite is bundled to store the form definitions, providing simple CRUD operations without the overhead of a full database server.
Current open issues include adding history tracking, visualizing the internal tree structure, and GUI controls for field visibility and validation logic, which are slated for future development.
Sohu Tech Products
A knowledge-sharing platform for Sohu's technology products. As a leading Chinese internet brand with media, video, search, and gaming services and over 700 million users, Sohu continuously drives tech innovation and practice. We’ll share practical insights and tech news here.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.