Feature RTC NPM Resource Changed PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
13 Sep 2025

Pull Request for Issue #45994 .

Summary of Changes

Add subform-order-changed event when order is changed in subform.

Testing Instructions

Apply patch.
Run npm install.
Add subform somewhere, example in Custom HTML module parameters:

<field type="subform" name="subform" label="Subform" multiple="true">
  <form>
    <field type="text" name="text" label="Text"/>
  </form>
</field>

Add in to index.php of Atum template:

$wa->addInlineScript('
 document.addEventListener("subform-order-changed", function(event) {
    console.log("fromPosition: " + event.detail.fromPosition, "toPosition: " + event.detail.toPosition);
 });
', [], ['type' => 'module']);

Open the form with sbform, open browser console.
Try sort the rows in subform, and check console output.

Actual result BEFORE applying this Pull Request

Console is silent

Expected result AFTER applying this Pull Request

In console a message like "fromPosition: 0, toPosition: 1"

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org: joomla/Manual#579
  • No documentation changes for manual.joomla.org needed
avatar Fedik Fedik - open - 13 Sep 2025
avatar Fedik Fedik - change - 13 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Sep 2025
Category JavaScript Repository NPM Change
avatar Fedik
Fedik - comment - 13 Sep 2025

I will rebase to 6.1 when it will be in sync

avatar ceford ceford - test_item - 17 Sep 2025 - Tested successfully
avatar ceford
ceford - comment - 17 Sep 2025

I have tested this item ✅ successfully on 08a3f52

I found the instructions difficult. As this is a single JavaScript file change the rebuild should be npm run build:js. I used a new instance of Modules: Articles to test as there are already two subforms there. I created two instances of the Test text and moved them up/down. In the Console I needed to select the Logs item to see the message (I am not too familiar with the Console). Got there in the end!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46093.

avatar Fedik Fedik - change - 19 Oct 2025
Title
[6.0] Subform: add order-changed event
[6.1] Subform: add order-changed event
avatar Fedik Fedik - edited - 19 Oct 2025
avatar tecpromotion tecpromotion - change - 23 Jan 2026
Labels Added: Feature NPM Resource Changed PBF PR-6.1-dev
avatar tecpromotion tecpromotion - alter_testresult - 23 Jan 2026 - ceford: Tested successfully
avatar muhme
muhme - comment - 23 Jan 2026

@Fedik We are sorry, couldn't test it. We applied PR and run npm ci, created custom HTML module with given content, inserted the code in administrator/templates/atum/index.php, reloaded backend page and moved the custom site module around in the list of site modules, but no console log. What could be missing?

avatar Fedik
Fedik - comment - 23 Jan 2026

the custom site module around in the list of site modules, but no console log. What could be missing?

Need to move the subform rows from the example 😉
Or any other subform, can also try create Custom field "subfrom" for article, and test it there.

avatar muhme muhme - test_item - 23 Jan 2026 - Tested successfully
avatar muhme
muhme - comment - 23 Jan 2026

I have tested this item ✅ successfully on 474b6b7

Tested with JBT

  • Applied PR with Patch Tester and running npm run build:js
  • Inserted the JS-snippet in administrator/templates/atum/index.php in the beginning, after $wa is set
  • Created Number field and Text field first and Subform field second with the number and the text field
  • in the backend, in the subform field configuration, moving the second field in first place or back, always results in the console log message
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46093.
avatar richard67 richard67 - change - 23 Jan 2026
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 23 Jan 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46093.

avatar richard67 richard67 - change - 23 Jan 2026
Labels Added: RTC
Removed: PBF
avatar HLeithner HLeithner - close - 24 Jan 2026
avatar HLeithner HLeithner - merge - 24 Jan 2026
avatar HLeithner HLeithner - change - 24 Jan 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-01-24 10:15:18
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 24 Jan 2026

@Fedik thanks, could you please create/update documentation in the manual for it?

avatar Fedik Fedik - change - 26 Jan 2026
The description was changed
avatar Fedik Fedik - edited - 26 Jan 2026
avatar Fedik
Fedik - comment - 26 Jan 2026

There it is:

Add a Comment

Login with GitHub to post a comment