Event reference
view/ready
Published once all additional view-model modules registered via
dynamicJavaScriptModules.additionalViewModelModules have
bootstrapped. EXT:form uses this event to remove the loading indicator
and finish editor initialisation. This is the earliest safe point to
interact with the fully wired editor.
- Arguments
-
none
export function bootstrap(formEditorApp) {
formEditorApp.getPublisherSubscriber().subscribe('view/ready', () => {
});
}
core/ajax/renderFormDefinitionPage/success
Published after the preview Ajax request returns successfully. EXT:form
uses this to display the rendered form HTML in the preview stage.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Rendered HTML of the current form page. |
args[1] |
number | Zero-based index of the rendered page. |
core/ajax/error
Published when any Ajax request (save or preview render) fails at the
HTTP level. EXT:form shows an error flash message and displays the raw
error in the preview area.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | HTTP status text (e.g. 'Internal Server Error'). |
args[1] |
string | Raw response body. |
core/applicationState/add
Published every time an action (add / remove / move element or
collection element) is pushed onto the undo/redo stack. EXT:form uses
this to enable or disable the undo/redo buttons.
- Arguments
-
| Index |
Type |
Description |
args[0] |
ApplicationState | Snapshot of the application state that was just pushed. |
args[1] |
number | Current stack pointer position (0-based). |
args[2] |
number | Total number of entries in the undo/redo stack. |
view/collectionElement/new/added
Published after a new validator or finisher has been created and added to
the form definition. EXT:form re-renders the inspector.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Identifier of the new collection element (e.g. 'NotEmpty'). |
args[1] |
string | Collection name: 'validators' or 'finishers'. |
args[2] |
FormElement | The owning form element. |
args[3] |
object | Full configuration object of the added collection element. |
args[4] |
string | Identifier of the reference element (inserted before/after). |
view/collectionElement/moved
Published after a validator or finisher has been reordered. EXT:form
re-renders the inspector.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Identifier of the moved element. |
args[1] |
string | Relative position: 'before' or 'after'. |
args[2] |
string | Identifier of the reference element. |
args[3] |
string | Collection name. |
args[4] |
FormElement | The owning form element. |
view/collectionElement/removed
Published after a validator or finisher has been removed from the form
definition. EXT:form re-renders the inspector.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Identifier of the removed element. |
args[1] |
string | Collection name. |
args[2] |
FormElement | The owning form element. |
view/insertPages/perform
Published when the user selects a page type in the "New page" dialog.
EXT:form creates the page after the currently selected page.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Form element type identifier (typically 'Page'). |
view/stage/abstract/render/preProcess
Published immediately before the abstract stage area is re-rendered.
- Arguments
-
none
view/stage/abstract/render/postProcess
Published immediately after the abstract stage area has been rendered.
EXT:form uses this to re-render the undo/redo buttons and apply validation
error highlights.
- Arguments
-
none
view/stage/preview/render/postProcess
Published after the preview stage area has been rendered. EXT:form uses
this to re-render the undo/redo buttons.
- Arguments
-
none
view/stage/element/clicked
Published when a form element in the abstract stage is clicked. EXT:form
selects the element, shows its toolbar and re-renders the inspector.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string |
__identifierPath of the clicked element. |
view/stage/panel/clicked
Published when the stage panel header or background area is clicked
(not on a specific form element).
- Arguments
-
none
view/stage/abstract/dnd/start
Published when a drag operation begins in the abstract stage. EXT:form
adds CSS classes to highlight the dragged element.
- Arguments
-
| Index |
Type |
Description |
args[0] |
HTMLElement | The dragged element's DOM node. |
args[1] |
HTMLElement | The drag placeholder DOM node. |
view/stage/abstract/dnd/change
Published on each positional change during a drag operation in the stage
(SortableJS
onChange). EXT:form applies hover CSS classes.
- Arguments
-
| Index |
Type |
Description |
args[0] |
HTMLElement | The drag placeholder DOM node. |
args[1] |
string |
__identifierPath of the potential parent element. |
args[2] |
FormElement | Innermost enclosing composite element (if any). |
view/stage/abstract/dnd/update
Published at the end of a drag operation when the element was dropped in a
new position (SortableJS
onEnd). EXT:form calls
moveFormElement() to persist the new order.
- Arguments
-
| Index |
Type |
Description |
args[0] |
HTMLElement | The dropped DOM node. |
args[1] |
string |
__identifierPath of the moved element. |
args[2] |
string |
__identifierPath of the preceding sibling (empty string if first). |
args[3] |
string |
__identifierPath of the following sibling (empty string if last). |
view/stage/abstract/dnd/stop
Published after the drag operation completes and all model updates are
done. EXT:form re-renders tree, stage and inspector and selects the moved
element.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string |
__identifierPath of the element that was dragged. |
view/inspector/collectionElement/new/selected
Published when the user selects a new validator or finisher from the
select box in the inspector. EXT:form adds the collection element to the
form definition and re-renders the inspector.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Identifier of the selected collection element. |
args[1] |
string | Collection name ('validators' or 'finishers'). |
view/inspector/collectionElement/existing/selected
Published when the user expands an existing validator or finisher row
in the inspector. EXT:form renders that element's sub-editors.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Identifier of the already-selected collection element. |
args[1] |
string | Collection name. |
view/inspector/collectionElements/dnd/update
Published when a validator or finisher is reordered via drag-and-drop
inside the inspector (SortableJS
onEnd). EXT:form moves the element
in the form definition.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string | Identifier of the moved element. |
args[1] |
string | Identifier of the preceding element after the move. |
args[2] |
string | Identifier of the following element after the move. |
args[3] |
string | Collection name. |
view/modal/validationErrors/element/clicked
Published when the user clicks a form element link inside the validation
error dialog. EXT:form selects the element and navigates to it.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string |
__identifierPath of the element with the validation error. |
view/structure/root/selected
Published when the root element in the structure tree is clicked. EXT:form
selects the root form element and re-renders stage, tree and inspector.
- Arguments
-
none
view/structure/button/newPage/clicked
Published when the "Create new page" button inside the structure tree panel
is clicked. EXT:form opens the "New page" dialog.
- Arguments
-
| Index |
Type |
Description |
args[0] |
'view/insertPages/perform' | Target publish event for the dialog result. |
view/structure/renew/postProcess
Published after the structure tree has been fully re-rendered. EXT:form
uses this to apply validation error markers to tree nodes.
- Arguments
-
none
view/tree/node/clicked
Published when a node in the structure tree is clicked. EXT:form selects
the element and re-renders stage and inspector.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string |
__identifierPath of the clicked element. |
view/tree/node/changed
New in version 13.4
This event was previously missing from the documentation. It has been
dispatched since inline label editing in the structure tree was introduced.
Published when a tree node label is edited inline (inline-rename). EXT:form
writes the new label to the FormElement model and updates the inspector if
the element is currently selected.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string |
__identifierPath of the renamed element. |
args[1] |
string | The new label string. |
view/tree/render/listItemAdded
Note
This event is defined in the TypeScript event-map interface but is
not yet published by the core tree component. It is reserved for
future use. Subscribing to it will currently have no effect.
Published by the tree component for each form element as it is added to
the rendered tree. Use this to augment individual tree nodes.
- Arguments
-
| Index |
Type |
Description |
args[0] |
HTMLElement | null | The list item DOM node that was added. |
args[1] |
FormElement | The FormElement model for this tree node. |
view/tree/dnd/change
Published on each positional change during a drag in the structure tree
(SortableJS
onChange). EXT:form applies hover CSS classes.
- Arguments
-
| Index |
Type |
Description |
args[0] |
HTMLElement | null | The drag placeholder node. |
args[1] |
string |
__identifierPath of the potential parent element. |
args[2] |
FormElement | Innermost enclosing composite element (if any). |
view/tree/dnd/update
Published when a drag in the structure tree ends and the element was
dropped in a new position. EXT:form calls
moveFormElement().
- Arguments
-
| Index |
Type |
Description |
args[0] |
HTMLElement | null | The dropped DOM node. |
args[1] |
string |
__identifierPath of the moved element. |
args[2] |
string |
__identifierPath of the preceding sibling. |
args[3] |
string |
__identifierPath of the following sibling. |
view/tree/dnd/stop
Published after the tree drag operation completes. EXT:form re-renders
tree, stage and inspector and selects the moved element.
- Arguments
-
| Index |
Type |
Description |
args[0] |
string |
__identifierPath of the element that was dragged. |