NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
Status : OK, INVALID
StatusMessage :
ActionTarget :
ActionContext :
PageTarget :
Param1 :
Param2 :
Param3 :
# Draft autosave — `def_form.Autosave`
`def_form.Autosave char(1) NOT NULL DEFAULT 'N'` gates client-side **draft
autosave + the "restore unsaved changes" banner** (`axion.formstate.js`) per
form. It is **off by default**, so the banner never appears on a form (e.g.
the login form) unless explicitly enabled with `Autosave='Y'`.
Wiring (not in this module):
- `factory.formlayout/ObjLayoutBasic.py` (`render_submit_script`) emits
`axion_formstate_init({… , autosave: <Autosave=='Y'>})`.
- `resource.web/javascript/axion.formstate.js` (`init`) only runs the
`loadDraft`/restore-banner + the change/input autosave listeners when
`autosave` is true. The **offline submit queue is independent** and stays
active regardless.
See `resource.web/javascript/axion.formstate.md` and the
`reference_form_autosave_gate` memory.
## MQTT telemetry
`Parse()` emits registry events. All payload data is passed via named
`context` keys rather than positional `param1-9` slots:
- `MqttEventType.FORM_SUBMITTED` (table `event_form_submitted`) at the
persist outcome with the result in `event_state` (`PASS`/`FAIL`) and
`context = {"form", "record_guid", "base_table", "outcome", "workflow"}`.
- `MqttEventType.FORM_VALIDATION_FAILED` at each rejecting stage
(`event_state` = `VALIDATION` / `SERVICE` / `AI`) with `context = {"form",
"issue_fields", "message", "record_guid", "field_results"}`.
## Language
`self.Language` is this request's language, set by the page layer
(`WebPageForm._bind_form_language`) **before `read()`** — `read()`
already sends the submit caption through `process_text`, and
`ObjLayoutBasic` does the same for the title, header, grouping labels
and buttons, so anything set later is set too late.
Empty means English fallbacks, which is what every form rendered
before `{t:key|English}` markers existed. See `ObjTranslation.md`
("Forms") for the whole path.
`field_factory` copies it onto every field element as BOTH `Language`
and `_Language`, before `read_fields`:
- `Language` is what `process_text` reads to expand markers. Each
element's `process_text` is this form's own bound method, so the
form is the object the text layer asks — one place to set it.
- `_Language` is what the field base's locale machinery keys on
(`_language_candidates` -> `_localise`, `_is_rtl`): locale-keyed
YAML templates, localised validation messages, `dir="rtl"`. That
code shipped long ago and never worked, because nothing anywhere
set the attribute it reads.
[//]: <> (CYTHON START)
## Cython compile
> cythonize -3 -a -i WebForm.py
Compiling /home/axion/projects/axion/factory.web/WebForm.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.web/WebForm.py
*Updated : 2025-10-02*
[//]: <> (CYTHON END)