if($checked==“true”){$Badge=“ok”;} else{$Badge=“calendar”;}.
The system attribute is named $Checked
. (Almost every system attribute begins with a capital letter; the exceptions are all obsolete attributes you are very unlikely to use.). SO:
if($Checked==true){$Badge=“ok”;} else{$Badge=“calendar”;}.