Features
What your users get
A designer for people who are not developers, and a form that behaves exactly like one you wrote in code.
The toolbox groups the fields into Basic, Choices, Advanced and Layout. Drag a field onto the canvas, or press Enter to add it after the selection. The canvas is a 12 column grid with a live look of the real controls: set a width of 3, 4, 6, 8, 9 or 12 columns, move a field by dragging it or with Alt+Up and Alt+Down, duplicate it or delete it. Undo and Redo work with Ctrl+Z and Ctrl+Y.
Inspector
The Field tab sets the label, a name generated from the label and kept unique, placeholder, help text, default value, required, read only, the options one per line, min and max, rows and the input mask. The Form tab sets the title, the description, a vertical or horizontal layout, the submit text and the reset button.
Validation rules
Each field takes a list of rules: length, range, pattern, email and custom, each with its own error message. They are the rules of TsgcHTMLComponent_Form, so the published form validates in the browser, with LiveValidation while the user types, and again on the server with Validate.
Conditional fields
Show a field only while an earlier field equals, does not equal or contains a value, is empty or not empty, or is greater or less than a number. The browser and the server apply the same rules: a hidden field is not posted, a required field hidden by its condition never fails, and a field that depends on a hidden field is hidden too.
18 field types
Text, email, password, number, textarea, select, radio, checkbox, switch, date, time, color, range, file and hidden, plus heading, paragraph and divider to lay the form out. FieldTypes sets which of them the toolbox offers.
Preview and JSON
Preview renders the design on the server as a real form with the look of the linked one, so its validation, masks and conditions run, and submitting it never posts. The JSON view shows the definition to view, copy, edit and apply. ShowPreview and ShowJSON turn the views on or off.
Templates
Templates holds one Caption=JSON line per template, and the toolbar offers them to start a new form from. New asks before it discards unsaved changes, and leaving the page with unsaved changes warns too.
Accessibility
Every action works from the keyboard. The toolbox and the canvas are WAI-ARIA listboxes, and a polite live region announces added, deleted, moved and saved fields and errors. The builder follows the page theme (data-bs-theme), mirrors itself under dir="rtl" and respects reduced motion.