Hi
I’ve copied the example from the docs for default values in a Structure Field but it doesn’t seem to be working? Should it not pre populate a structure field on page creation or am i misunderstanding something? Thanks for any help.
Hi
I’ve copied the example from the docs for default values in a Structure Field but it doesn’t seem to be working? Should it not pre populate a structure field on page creation or am i misunderstanding something? Thanks for any help.
Could you please post your code?
Thanks for getting back to me.
Tests blueprint
title: Tests
preview: false
pages:
template: test
files: false
fields:
title:
label: Title
type: text
Test blueprint
title: Test
fields:
title:
label: Title
type: title
emails:
label: Emails
type: structure
default:
- email: bastian@getkirby.com
- email: sascha@getkirby.com
- email: nico@getkirby.com
fields:
email:
label: Email
type: email
So when a test (page) is created the structure is not pre populated. If i then change the “emails” field name in the blueprint and reopen the created test page the structure is pre populated?
Yes, that sounds like an issue. I tested this on the starter kit and when I added the structure field to the blueprint, three default entries were created for all existing (project) pages but none when I create a new page.
@all Maybe someone can confirm this behavior, before we create an issue on Github or what is the expected result?