Structur fieleds prefilled and readonly fields

Hello,

how to create a prefilled structurfield table ?
I tried it that way:

  shipping_zone:
    label: Versand-Zonen
    type: structure
    style: table
    limit: 5
    default: 
    - zone: 1
    - zone: 2
    - zone: 3
    - zone: 4
    - zone: 5
    fields:
      zone:
        label: Zone
        type: Number
        readonly: true
      price_eur:
        label: Preis EUR
        type: Number
      price_chf:
        label: Preis CHF
        type: Number

Your indentation is not correct

https://getkirby.com/docs/cheatsheet/panel-fields/structure

okay now i think the indentation is right,

shipping_zone:
        label: Versand-Zonen
        type: structure
        style: table
        limit: 5
        default: 
          - zone: 1
          - zone: 2
          - zone: 3
          - zone: 4
          - zone: 5
        fields:
          zone:
            label: Zone
            type: Number
            readonly: true
          price_eur:
            label: Preis EUR
            type: Number
          price_chf:
            label: Preis CHF
            type: Number

Do I understand correctly with default content is specified?

I don’t understand your question…

yes my english…

what i looking for is:
when the editor add a new row the field zone is prefilled with continuous number
like excell the row numbers.

The default content is only created in the beginning, when there is not other content yet. It is not possible by default to add a continuous number to a new entry. You can do two things:

  • Create a custom structure field that adds the number on clicking the add button
  • Add the continuous number on saving using a hook.

I found a not super smart solution but it works.
Added 5 rows and set the row numbers and then
updated the blueprint:

  zone:
    label: Zone
    type: Number
    readonly: true

Thank you @texnixe for you help