Blueprint default value "0"

tried to set a “0” as a default value of a text/number field in a blueprint… does not work for “0” but for “00”, “1” and everything else.

  backgroundvideooffset:
    label: Start offset
    type: number
    default: 0

somebody can confirm this or am i doing something wrong?

Can reproduce that problem, created an issue: https://github.com/getkirby/panel/issues/497

Edit: And will be hopefully fixed soon on the develop branch and in a next release.

1 Like
  minutesDuration:
    label: Übungsdauer (min)
    type: number 
    default: 0 

I had a follow up issue to the default:0 as number, when using
<?php if($article->minutesPrepare()->isNotEmpty()): ?>

FYI: had to change to
if(... minutesPrepare() >= 0)

Yes, the underlying PHP empty() function returns true for 0: PHP: empty - Manual

Ok - thank you. Did not realize, that it’s due to native php empty.