I am currently developing a custom panel field that has several inputs for every day of the week to give the user the opporturnity to enter opening or visiting hours.
The form itself looks good so far in the panel, but the data is not stored in the content folder. I implemented the text input fields with array name notation (eg. hours[Sun][from], hours[Sun][to], hours[Mon][from] etc). When I debug the app until the call to $site->update(), everything looks fine to me.
Is Kirby capable of storing this array data? If yes, do I need to do something special?
Whatever other field you’ve extended should implement the method already, so calling parent::result() ought to grab your data out of the POST request, which in our cases will be the multi-dimensional PHP object.
The Toolkit provides the YAML encoding functionality you need.
Also! Be sure to implement the value method to make sure your data is decoded when loaded into the panel.