at the function JModelAdmin::save($data)
all entries of the subform should be in the $data object
$data['subform']['1']
$data['subform']['2']
example code in Editform:
<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates1">
<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates2" data-new="true">
at the function JModelAdmin::save($data)
the entry you added get the same id like the existing entry. So the new one will override the existing one.
$data['subform']['1']
example code in Editform:
<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates1">
<div class="subform-repeatable-group subform-repeatable-group-sr-0" data-base-name="eventdates" data-group="eventdates1" data-new="true">
Joomla Version 3.9.X (tested on 3.9.12 and 3.9.14)
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-01-08 11:47:58 |
Closed_By | ⇒ | alikon |
Closed_By | alikon | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/27435
we already have a fix and will be available in 3.9.15
Should be already solved with PR #27334 . @mggcodes Please check, and if solved close this issue.