October: Limit the items in backend form repeater

Created on 3 Feb 2017  路  6Comments  路  Source: octobercms/october

Is there any way to limit the repeater items?

Let say I use repeater plus media finder to be a image slider, and I only want user to upload maximum 5 images. Is is possible to limit the items in repeater?
Temporary, I just check the items in repeater on Model Event only.

Thank you.

October build

v1.0.390

All 6 comments

@joelamltc good question! I would like to know this too ;)

It is currently not supported as you see no config for this function in this file:
https://github.com/octobercms/october/blob/master/modules/backend/formwidgets/Repeater.php

If you want to add it to the core, feel free to request a PR.

Unluckily, my experience is not enough to update the core.

@joelamltc I'll give it a try when I have some time.

@SebastiaanKloos Thank you so much.

Duplicate of #1710, fixed by #2723

Was this page helpful?
0 / 5 - 0 ratings