what I’m trying to archive is a flexible page content form in admin panel. therefore I nested fieldsets within a list. put some js and css to hide and show fields and so on.
But then I ran into a problem, that values within a given fieldset are hard to reference. If I save the form, values are saved to a md file, but are not referenced/displayed in the form anymore. I also tried some parts of an older post https://discourse.getgrav.org/t/conditional-field-creating-a-flexible-content-field-like-advanced-custom-fields-wordpress-plugin/7293/2 but that didn’t work either. when form values are saved to md, dot notation gets interpreted as another nesting, therefor form’s reference to values doesn’t work anymore (see code below).
Hopefully somebody can point me in the right direction or can confirm if this is even possible
form: fields: header.news_content: type: list fields: .additional_content_select: type: select options: default: 'none' external: 'external media via iframe' image: 'add an image' .additional_content_pos: type: fieldset fields: .additional_content_pos.pos: type: select options: before: 'before' after: 'after' left: 'on the left' right: 'on the right'
which outputs following values within corrosponding md file when saved:
news_content: - additional_content_select: default additional_content_pos: additional_content_pos: pos: left
if I delete the additional nesting, then values a referenced correctly within the form:
news_content: - additional_content_select: default additional_content_pos: pos: left