My client requested two features for the repeater formwidget and I would like to know if there is a bigger demand for this.

Add two options to the repeater formwidget:
collapsedByDefault: Collapse all repeater items in the same formwidget by default. Type: boolean, default: false.accordionStyle: Collapse other repeater items in the same formwidget when opening an item. Type: boolean, default: false.That sounds like a good idea to me @robinbonnes. Not sure about the config names but that's a minor detail that could be improved on later.
For now I can live with this quick-and-dirty fix to collapse repeaters by default:
$(document).render(function() {
$('form[data-object-type="page"] [data-control="fieldrepeater"]').each(function() {
$(this).fieldRepeater().data('oc.repeater').collapseAll();
});
});
@robinbonnes Sounds like a good improvement. Do you need any help with creating a PR?
This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
$(document).render(function() {
$('form[data-object-type="page"] [data-control="fieldrepeater"]').each(function() {
$(this).fieldRepeater().data('oc.repeater').collapseAll();
});
});
Hi there, was wondering where you put this code. Thanks
So this is added in the current version ? How to use it please?
@daslicht Somehow I missed this update! And a great one it is.
Looking through the Issues and having just tested to find it works :)
{repeater name="" tab="" prompt="" style="accordion"} ... {/repeater}
Options for style: https://github.com/octobercms/october/pull/4877#issue-362492258
@mightyhaggis @daslicht docs are updated here: https://github.com/octobercms/docs/blob/master/backend-forms.md#repeater. They'll be updated on the main site as soon as 467 becomes stable.
Most helpful comment
That sounds like a good idea to me @robinbonnes. Not sure about the config names but that's a minor detail that could be improved on later.