season:
type: number
default: "{{ site.getSeason }}"
It works if the field in a text field (it has the value 76 as default), but not with a number type.
Is there a problem with my variable not being considered as a number?
<?php
Kirby::plugin('squareclouds/customradio', [
'fields' => [
'radio' => [
'extends' => 'radio',
'props' => [
'disabled' => function ($disabled = null) {
if ($disabled !== true && $disabled !== false) { // <- if its other than true or false do the check of the user
if ($this->model->toSafeString($disabled) == "member")
return true; // <- hide if regular member
else
return false;
} else {
return $disabled;
}
},
]
]
]
]);
the disabling is working fine, but somehow all my radios look empty.
EDIT: BTW somehow the php was creating problems also in my select fields, so i had to comment it out for the time being. my selects in other parts of the panel were empty