I’m just curious what I’m doing wrong here. I’ve tried this with radios, selects and checkboxes and can’t seem to get a default value to be selected.
I’m just curious what I’m doing wrong here. I’ve tried this with radios, selects and checkboxes and can’t seem to get a default value to be selected.
Where are you using this field? Defaults only work if a page is newly created, so it won’t work in site, for example.
Oh, so it won’t work even if the field is newly added to a page. I see now.
Exactly, if you want to set default values to already existing pages, you could:
$page->field()->or('default')