diff --git a/scp/tickets.php b/scp/tickets.php index 1dda6f0fda890128e23211ff075b43ec7db493bf..6342dcaa94a92c232da8c0efe8ede8df0a59bab1 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -202,7 +202,8 @@ if($_POST && !$errors): // Don't validate deleted forms if (!in_array($form->getId(), $_POST['forms'])) continue; - elseif (!$form->isValid()) + $form->setSource($_POST); + if (!$form->isValid()) $errors = array_merge($errors, $form->errors()); } if(!$ticket || !$thisstaff->canEditTickets()) diff --git a/tickets.php b/tickets.php index 0d675aa88c9075fcbc872e0fdf006161fcd68e96..b2655fa1388c878616ae879b61be8fdf52ec83a6 100644 --- a/tickets.php +++ b/tickets.php @@ -47,9 +47,11 @@ if($_POST && is_object($ticket) && $ticket->getId()): $errors['err']='Access Denied. Client updates are currently disabled'; else { $forms=DynamicFormEntry::forTicket($ticket->getId()); - foreach ($forms as $form) + foreach ($forms as $form) { + $form->setSource($_POST); if (!$form->isValid()) $errors = array_merge($errors, $form->errors()); + } } if (!$errors) { foreach ($forms as $f) $f->save();