Hello, I’m using the recordfinder inside the repeater, but when I try to select a record on the next page of the recordfinder I get the following error. Is this a bug or did I do something wrong?
gift_product:
label: Gifts for All
type: repeater
form:
fields:
product:
label: Product
type: recordfinder
list: ~/plugins/offline/mall/models/product/columns.yaml
recordsPerPage: 10
title: Find Record
nameFrom: name
descriptionFrom: description_short
useRelation: false
modelClass: '\Offline\Mall\Models\Product'
The link in the address bar has changed. But after selecting an item, the parameters were not cleared. Is this also intended?
Another interesting bug, I am expanding the StaticPage plugin, I added a repeater, but when creating a new item it looks like this
If the recordfinder is the repeater’s field, then everything works well, but when you build another repeater with a recordfinder into the repeater, this error appears
A lot of guesswork on my side, but maybe this is helpful:
You need to make sure that your form configuration is processed, even when non of your controller actions are hit. The pattern I saw in others code and I also use, is to set a flag like ‘_gift_record_finder’ through a hidden field or manipulating the ajax request, and then check for this flag in an init function or a constructor (depending on your use case) and initialize the form/widget there.