List limit

Hi guys,

I’m just currently messing about with Grav and I’m having a look at adding a list of fields a user can add but I want to limit so they can only add like 3. Is this possible? Is there like a size, or max, or limit option I can set on the list field?

Here’s my yaml:

form:
    fields:
        tabs:
            fields:
                banana:
                    type: tab
                    title: Banana
                    fields:
                        header.banana:
                            name: banana
                            type: list
                            label: Banana                        

                            fields:
                                .caption: 
                                    type: text
                                    label: Caption
                                .image:
                                    type: file
                                    destination: '@page:/banana'
                                    accept:
                                        - image/*

---

Nothing is explicitly limiting levels. Your code looks ok to me at first glance.

Sorry, I meant is there a way to limit it. I want it to be limited.

I don’t believe it has a limit. Can you create an issue here: https://github.com/getgrav/grav-plugin-admin/issues