Skip to content

Kitto.Html.Editors ​

Unified editor factory for KittoX è produces the HTML for input elements shared by both form editors (Kitto.Html.Form) and filter inputs (Kitto.Html.List). Each method returns ONLY the <input>/<select>/<textarea> markup (no wrapper div, no label). Callers supply context via TKXEditorContext. No dependencies on Metadata, Store, Config, or SQL.

TKXEditorContext record ​

Carries all the per-field context needed to render a single input: element id/name, current value(s), width styles, state flags (read-only, required, key) and the CSS class. Passed by value to every TKXEditorFactory.Render* method.

TKXEditorFactory class ​

Stateless factory of class methods that build the raw HTML markup for each editor/input type (text, select, checkbox, date, currency, memo, reference, etc.) from a TKXEditorContext. Used by both form editors and filter inputs.

pascal
class function RenderInput(ADataType: TEFDataType;

Dispatches to the correct Render* method based on ADataType.

pascal
class function RenderTextInput(const ACtx: TKXEditorContext;

Renders a text <input> (optionally password), with the given max length.

pascal
class function RenderSearchInput(const ACtx: TKXEditorContext;

Renders a search text <input> with the given placeholder (filter panels).

pascal
class function RenderSelectInput(const ACtx: TKXEditorContext;

Renders a <select> from the given value/label pairs (optionally with an empty item).

pascal
class function RenderCheckboxInput(const ACtx: TKXEditorContext): string;

Renders a boolean checkbox input.

pascal
class function RenderDateInput(const ACtx: TKXEditorContext): string;

Renders a date input (<input type="date">).

pascal
class function RenderTimeInput(const ACtx: TKXEditorContext): string;

Renders a time input (<input type="time">).

pascal
class function RenderDateTimeInput(const ACtx: TKXEditorContext): string;

Renders a combined date + time input pair.

pascal
class function RenderIntegerInput(const ACtx: TKXEditorContext;

Renders an integer input (optionally with spin/speed buttons).

pascal
class function RenderCurrencyInput(const ACtx: TKXEditorContext;

Renders a currency input with the given decimals/separator/symbol and JS callbacks.

pascal
class function RenderDecimalInput(const ACtx: TKXEditorContext): string;

Renders a decimal (floating-point) input.

pascal
class function RenderMemoInput(const ACtx: TKXEditorContext;

Renders a multi-line memo (<textarea>) with the given number of rows.

pascal
class function RenderHtmlMemoInput(const ACtx: TKXEditorContext;

Renders a rich-text (HTML) memo editor (SunEditor) with the given rows/config.

pascal
class function RenderNumberInput(const ACtx: TKXEditorContext): string;

Renders a generic numeric input.

pascal
class function RenderSmallReferenceSelect(const ACtx: TKXEditorContext;

Renders a <select> from pre-built options HTML (for FK small references).

pascal
class function RenderLargeReferenceEditor(const ACtx: TKXEditorContext;

Renders the lookup wrapper with hidden key input + display input + buttons.

pascal
class function BuildInputAttrs(const ACtx: TKXEditorContext): string;

Builds the standard id/name/required/disabled attribute string.

Released under Apache License, Version 2.0.