I am working a a website which shows individual opening hours for a lot of businesses. I am quite happy using the structure field. Only downside is that I can’t prefill all the rows with e.g. the weekdays. That is a bit annoying for the content creators. I am trying:
fields:
openinghours:
label: Öffnungszeiten
type: structure
columns:
day:
width: 1/3
status:
width: 1/6
from:
width: 1/4
to:
width: 1/4
default:
- day: Montag
status: open
- day: Dienstag
status: open
- day: Mittwoch
status: open
- day: Donnerstag
status: open
- day: Freitag
status: open
- day: Samstag
status: open
- day: Sonntag
status: closed
- day: Feiertag
status: closed
fields:
day:
type: text
label: Tag
disabled: true
status:
type: select
label: Status
default: open
options:
open: Geöffnet
closed: Geschlossen
from:
type: time
label: Von
display: HH:mm
step: 900
when:
status: open
to:
type: time
label: Bis
display: HH:mm
step: 900
when:
status: open`