getAllOrientations(); $apPrograms = $db->getAllAPPrograms(); $finalityTypes = $db->getAllFinalityTypes(); $languages = $db->getAllLanguages(); $formatTypes = $db->getAllFormatTypes(); $licenseTypes = $db->getAllLicenseTypes(); } catch (Exception $e) { error_log("Failed to load form data: " . $e->getMessage()); die("Erreur lors du chargement du formulaire."); } $formData = $_SESSION['form_data'] ?? []; unset($_SESSION['form_data']); $autofocusField = App::consumeAutofocus(); // Flash error consumed by the flash-messages partial below. /** * Merge autofocus into the $attrs array for a given field. * Only adds the attribute when $autofocusField matches $fieldName. */ function withAutofocus(string $fieldName, array $attrs = []): array { global $autofocusField; if ($autofocusField === $fieldName) { $attrs['autofocus'] = true; } return $attrs; } function old($key, $default = "") { global $formData; return isset($formData[$key]) ? htmlspecialchars($formData[$key]) : $default; } function wasSelected($key, $value) { global $formData; if (!isset($formData[$key])) return false; if (is_array($formData[$key])) return in_array($value, $formData[$key]); return $formData[$key] == $value; } ?>

Ajouter un TFE

"> 'name']); include APP_ROOT . '/templates/partials/form/text-field.php'; ?> 'email']; include APP_ROOT . '/templates/partials/form/text-field.php'; ?> 2000, 'max' => date('Y') + 1]); include APP_ROOT . '/templates/partials/form/text-field.php'; ?>