Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/general-concepts/forms-fields/standard-fields/subform.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ If you have javascript validation set in fields of your subform (set by the clas

This is also true for custom fields which extend SubformField.

### Events

- `subform-row-add` Event dispatched after new row has been added. Target: subform element. CustomEvent detail property contain affected row: `detail.row`.
- `joomla:updated` Event dispatched after new row has been added. Target: affected row element.
- `subform-row-remove` Event dispatched before removing the row. Target: subform element. CustomEvent detail property contain affected row: `detail.row`.
- `joomla:removed` Event dispatched before removing the row. Target: affected row element.
- `subform-order-changed` Event dispatched after rows ordering has been changed. Target: subform element. CustomEvent detail property contain affected row: `detail.row`, index of original position: `detail.fromPosition`, index of final position: `detail.toPosition`.

All events are bubbles up in DOM.

## Server-side validation and filters

Server-side validation and filters are applied to the fields of the subform as normal, in the same way as when those fields are not part of a subform.
Expand Down
5 changes: 5 additions & 0 deletions migrations/60-61/new-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ Any changes in best practice.
A new layout `joomla.form.field.subform.repeatable-grid` that renders subform fields in a grid (partially mimicking the table look), making it more responsive compared to the table layout.

- PR: https://github.com/joomla/joomla-cms/pull/42347

## New event for `subform` field
Added `subform-order-changed` event when order is changed in subform field.

- PR: https://github.com/joomla/joomla-cms/pull/46093