hasPermission("HACHEPORTAL_EDIT")) { header("Location: ./app.php?msg=no_permission"); die(); } $editing = false; if (empty($VARS['id']) || !$database->has('families', ['familyid' => $VARS['id']])) { $family = new Family(); $family->setExpires(strtotime("+1 year")); } else { $famid = $VARS['id']; $family = (new Family())->load($famid); $editing = true; } ?>

build("Editing Family", ['family' => "" . htmlentities($family->getName()) . ""]); ?> get("Adding Family"); ?>
get("Cancel"); ?>

Basic Information

"Family Name (Last Name)", "icon" => "fas fa-users", "name" => "familyname", "maxlength" => 100, "value" => $family->getName(), "error" => "Enter a last name." ], [ "label" => "Father's Name", "icon" => "fas fa-male", "name" => "fathername", "maxlength" => 255, "value" => $family->getFather(), "error" => "Enter the father's name." ], [ "label" => "Mother's Name", "icon" => "fas fa-female", "name" => "mothername", "maxlength" => 255, "value" => $family->getMother(), "error" => "Enter the mother's name." ], [ "label" => "Street Address", "icon" => "fas fa-home", "name" => "streetaddress", "maxlength" => 500, "value" => $family->getAddress(), "error" => "Enter an address." ], [ "label" => "City", "icon" => "fas fa-city", "name" => "city", "maxlength" => 255, "width" => 3, "value" => $family->getCity(), "error" => "Enter a city." ], [ "label" => "State", "icon" => "fas fa-flag", "name" => "state", "type" => "select", "value" => $family->getState(), "error" => "Select a state.", "options" => [ 'MT' => 'Montana', 'AL' => 'Alabama', 'AK' => 'Alaska', 'AZ' => 'Arizona', 'AR' => 'Arkansas', 'CA' => 'California', 'CO' => 'Colorado', 'CT' => 'Connecticut', 'DE' => 'Delaware', 'DC' => 'District of Columbia', 'FL' => 'Florida', 'GA' => 'Georgia', 'HI' => 'Hawaii', 'ID' => 'Idaho', 'IL' => 'Illinois', 'IN' => 'Indiana', 'IA' => 'Iowa', 'KS' => 'Kansas', 'KY' => 'Kentucky', 'LA' => 'Louisiana', 'ME' => 'Maine', 'MD' => 'Maryland', 'MA' => 'Massachusetts', 'MI' => 'Michigan', 'MN' => 'Minnesota', 'MS' => 'Mississippi', 'MO' => 'Missouri', 'MT' => 'Montana', 'NE' => 'Nebraska', 'NV' => 'Nevada', 'NH' => 'New Hampshire', 'NJ' => 'New Jersey', 'NM' => 'New Mexico', 'NY' => 'New York', 'NC' => 'North Carolina', 'ND' => 'North Dakota', 'OH' => 'Ohio', 'OK' => 'Oklahoma', 'OR' => 'Oregon', 'PA' => 'Pennsylvania', 'RI' => 'Rhode Island', 'SC' => 'South Carolina', 'SD' => 'South Dakota', 'TN' => 'Tennessee', 'TX' => 'Texas', 'UT' => 'Utah', 'VT' => 'Vermont', 'VA' => 'Virginia', 'WA' => 'Washington', 'WV' => 'West Virginia', 'WI' => 'Wisconsin', 'WY' => 'Wyoming' ], "width" => 2 ], [ "label" => "ZIP/Postal Code", "icon" => "fas fa-mail-bulk", "name" => "zip", "maxlength" => 10, "width" => 3, "value" => $family->getZip(), "error" => "Enter a valid 5 or 9 digit ZIP code.", "pattern" => "[0-9]{5}(-?[0-9]{4})?" ], [ "label" => "Phone Number", "icon" => "fas fa-phone", "name" => "phone", "width" => 3, "maxlength" => 10, "type" => "tel", "pattern" => "[0-9]{10}", "value" => $family->getPhone(), "error" => "Enter a valid ten-digit phone number." ], [ "label" => "Email", "icon" => "fas fa-at", "name" => "email", "maxlength" => 255, "type" => "email", "value" => $family->getEmail(), "error" => "Enter an email address." ], [ "label" => "Newsletter Preference", "icon" => "fas fa-newspaper", "name" => "newsletter_method", "type" => "select", "value" => $family->getNewsletter(), "error" => "Choose an option.", "options" => [ "1" => "Email ($25)", "2" => "Paper ($35)", "3" => "Email and Paper ($35)" ] ], [ "label" => "Membership Expiration", "icon" => "fas fa-calendar", "name" => "date", "type" => "date", "width" => 3, "value" => date("Y-m-d", $family->getExpires()), "error" => "Choose a valid date." ] ]; foreach ($textboxes as $item) { ?>
">
" name="" class="form-control" placeholder="" aria-label="" maxlength="" pattern="" value="" required />

Children

get("To remove a child, delete the contents of the Name box."); ?>

getChildren()) > 0) { foreach ($family->getChildren() as $child) { $childid = $child->getID(); include __DIR__ . "/../lib/template_child_entry.php"; } } else { include __DIR__ . "/../lib/template_child_entry.php"; } ?>
Add another

Consent

get("Okay to use photos?"); ?>
getPhotoPermission()) { echo "checked"; } ?> required> getPhotoPermission()) { echo "checked"; } ?> required>
getPrivate()) { echo "checked"; } ?>>