diff --git a/pages/editperson.php b/pages/editperson.php index f66d218..0e023bf 100644 --- a/pages/editperson.php +++ b/pages/editperson.php @@ -267,6 +267,16 @@ if (!empty($VARS['id']) && $database->has('people', ['personid' => $VARS['id']]) "value" => $data["phone2"], "pattern" => "[0-9]{10}", "error" => "Enter a 10-digit phone number (numbers only)." + ], + [ + "label" => "Unit #", + "name" => "unit", + "width" => 2, + "maxlength" => 4, + "pattern" => "[0-9]{3,4}", + "value" => $data["unit"], + "optional" => true, + "error" => "Enter the unit number." ] ]); } diff --git a/public/parts/template_person.php b/public/parts/template_person.php index 180c154..96af316 100644 --- a/public/parts/template_person.php +++ b/public/parts/template_person.php @@ -189,7 +189,17 @@ if (isset($personid) && $database->has('people', ['personid' => $personid])) { "value" => $personinfo["phone2"], "pattern" => "[0-9]{10}", "error" => "Enter a 10-digit phone number (numbers only)." - ] + ], + [ + "label" => "Unit #", + "name" => "unit", + "width" => 2, + "maxlength" => 4, + "pattern" => "[0-9]{3,4}", + "value" => $personinfo["unit"], + "optional" => true, + "error" => "Enter the unit number." + ], ]); } if ($type == "adult" || $type == "youth") {