repeater simple vs schema
Hello,
In my model, I have a field named attachments, which is cast as an array. The field can contain multiple path and looks like this:
When I use a simple repeater with a ViewField, the $getState() function returns the string path of my images as expected:
However, when I switch from simple to schema, the $getState() function always returns null:
Here's the custom view:
By switching to schema, I'm encountering an issue where the state is not being retrieved correctly. Any guidance on resolving this would be greatly appreciated.
Solution:Jump to solution
Because simple returns a flat array, and non-simple returns an array containing the fields. So for non-simple the structure should be
```json
[
{'attachments': ...},...
1 Reply
Solution
Because simple returns a flat array, and non-simple returns an array containing the fields. So for non-simple the structure should be