Two bugs with Repeater fields

Hi,

I just worked a bit with repeater fields and I think I found two small bugs:

  1. My data for the repeater field is generated and therefor I dont want to edit it.
    However, if I add “disabled: true” to the form field, the data is removed from the database after saving

  2. I dont want to reorder the data for same reasons so I added “showReorder: false”
    But within the menu behind the gear icon menu, you can still find the entries “Move Up” and “Move Down”. Shouldnt those two be hidden now?

Here’s my config from fields.yaml

        test:
            type: repeater
            showReorder: false
            showDuplicate: false
            form:
                fields:
                    version:
                        type: dropdown
                        showSearch: false
                    file:
                        type: mediafinder
                    compatible:
                        type: balloon-selector

(removed unnecessary info like span and label etc, options are done in get() methods within the model)

October Version: 3.2.18

Edit: I also found a very strange bug with the dropdown and F5: If I press F5 while the record was open, the selected values in the dropdown were lost or shown incorrectly. On save, the data was saved incorrectly and therefor destroyed. This is easily reproduceable but sometimes the data is lost, sometimes it’s changed… somehow. Maybe have a look and you can reproduce it easily. If not, I can see if I can add more details here.

You should try to use readOnly instead of disabled since HTML doesn’t include disabled inputs in post back values.

1 Like

Thx for the reply ^^

readOnly worked for the dropdown and the mediafinder field, but the balloon-selector is still active even if I set readOnly to true.