UpdateXLS Template
Edit the following form in order to update the selected import XLS template
Mandatory Fields
- Template Name
- Row Header and Column Header: where the title of the excel starts
- Cheme
getConnection(); $stmt = $pdo->prepare("SELECT * FROM excel_templates WHERE id = ?"); $stmt->execute([$id]); $template = $stmt->fetch(PDO::FETCH_ASSOC); if (!$template) { header("Location: template_dashboard.php?status=error&message=" . urlencode("Template not found")); exit; } // Debug del JSON $clientSpecificFieldsJson = $template['client_specific_fields'] ?? '{}'; error_log("Raw client_specific_fields JSON: " . $clientSpecificFieldsJson); $clientSpecificFields = json_decode($clientSpecificFieldsJson, true); if (json_last_error() !== JSON_ERROR_NONE) { error_log("JSON decode error: " . json_last_error_msg()); $clientSpecificFields = []; } else { error_log("Decoded client_specific_fields: " . print_r($clientSpecificFields, true)); } ?>