diff --git a/include/client/view.inc.php b/include/client/view.inc.php index 59c3baff9d4e559422c6ebf5ab494fbd378d65af..9d5ebc758ad35fc0f97d864114b3b7642faaedbe 100644 --- a/include/client/view.inc.php +++ b/include/client/view.inc.php @@ -99,7 +99,7 @@ if ($thisclient && $thisclient->isGuest() <td colspan="2"> <!-- Custom Data --> <?php -$sections = array(); +$sections = $forms = array(); foreach (DynamicFormEntry::forTicket($ticket->getId()) as $i=>$form) { // Skip core fields shown earlier in the ticket view $answers = $form->getAnswers()->exclude(Q::any(array( @@ -112,11 +112,13 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $i=>$form) { if ($v = $a->display()) $sections[$i][$j] = array($v, $a); } + // Set form titles + $forms[$i] = $form->getTitle(); } foreach ($sections as $i=>$answers) { ?> <table class="custom-data" cellspacing="0" cellpadding="4" width="100%" border="0"> - <tr><td colspan="2" class="headline flush-left"><?php echo $form->getTitle(); ?></th></tr> + <tr><td colspan="2" class="headline flush-left"><?php echo $forms[$i]; ?></th></tr> <?php foreach ($answers as $A) { list($v, $a) = $A; ?> <tr>