Fieldset vue component gives an error on files field and structure field

in a custom field Iā€™m trying to build the fieldset component fails to render the files field and the structure field.

I have something like this: <k-fieldset v-model="storedvalues" @input="onInput" :fields="fieldset" />

where fieldset is an array of fields. Text and textarea render fine. A files field shows up initialy but disappears with an error ā€œCannot read property ā€˜fieldā€™ of undefinedā€ when clicked.

full code is here: https://github.com/art-and-flywork/kirby.field.fieldset
and this issue is here: https://github.com/art-and-flywork/kirby.field.fieldset/issues/1 :slight_smile:

Am I calling the fieldset the wrong way or is there something else I could do to make it work?

so after some more investigation it seems to be something with endpoints not being definedā€¦ Defined these, now it requests a route. But Iā€™m not realy sure what this route should provide.

Iā€™m now stuck here: https://github.com/art-and-flywork/kirby.field.fieldset/blob/master/index.php#L77

I donā€™t think a fieldset works out of the box with complex fields.
Maybe you can learn from the structure field how to do it: https://github.com/getkirby/kirby/blob/master/config/fields/structure.php

1 Like