diff --git a/include/client/view.inc.php b/include/client/view.inc.php
index 610bd2e929b95e1ef5a23b163b473aae9965b4af..ca9aa363cf15eafddda628f7ee3998546b61fc83 100644
--- a/include/client/view.inc.php
+++ b/include/client/view.inc.php
@@ -32,7 +32,7 @@ if ($thisclient && $thisclient->isGuest()
         <td colspan="2" width="100%">
             <h1>
                 <a href="tickets.php?id=<?php echo $ticket->getId(); ?>" title="<?php echo __('Reload'); ?>"><i class="refresh icon-refresh"></i></a>
-                <b><?php echo $ticket->getSubject(); ?></b>
+                <b><?php echo Format::htmlchars($ticket->getSubject()); ?></b>
                 <small>#<?php echo $ticket->getNumber(); ?></small>
 <div class="pull-right">
     <a class="action-button" href="tickets.php?a=print&id=<?php
diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index 4799b011a70e70875c3fb5a4b3360765ec6c5b93..9f0c7fca0d5c8b08b921ea19be07246cd8028029 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -50,7 +50,7 @@ if($ticket->isOverdue())
     $warn.='&nbsp;&nbsp;<span class="Icon overdueTicket">'.__('Marked overdue!').'</span>';
 
 ?>
-<div class="has_bottom_border">
+<div>
     <div class="sticky bar">
        <div class="content">
         <div class="pull-right flush-right">
@@ -194,12 +194,16 @@ if($ticket->isOverdue())
              <h2><a href="tickets.php?id=<?php echo $ticket->getId(); ?>"
              title="<?php echo __('Reload'); ?>"><i class="icon-refresh"></i>
              <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a>
-                 <?php if ($ticket) { ?> – <small><?php echo $ticket->getSubject(); ?></small><?php } ?>
             </h2>
         </div>
     </div>
   </div>
 </div>
+<div class="clear tixTitle has_bottom_border">
+    <h3>
+    <?php echo Format::htmlchars($ticket->getSubject()); ?>
+    </h3>
+</div>
 <table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
     <tr>
         <td width="50%">
@@ -403,9 +407,7 @@ if($ticket->isOverdue())
     </tr>
 </table>
 <br>
-<table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
 <?php
-$idx = 0;
 foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
     // Skip core fields shown earlier in the ticket view
     // TODO: Rewrite getAnswers() so that one could write
@@ -415,30 +417,36 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
         'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED,
         'field__name__in' => array('subject', 'priority')
     )));
-    if (count($answers) == 0)
+    $displayed = array();
+    foreach($answers as $a) {
+        if (!($v = $a->display()))
+            continue;
+        $displayed[] = array($a->getLocal('label'), $v);
+    }
+    if (count($displayed) == 0)
         continue;
     ?>
+    <table class="ticket_info custom-data" cellspacing="0" cellpadding="0" width="940" border="0">
+    <thead>
+        <th colspan="2"><?php echo Format::htmlchars($form->getTitle()); ?></th>
+    </thead>
+    <tbody>
+<?php
+    foreach ($displayed as $stuff) {
+        list($label, $v) = $stuff;
+?>
         <tr>
-        <td colspan="2">
-            <table cellspacing="0" cellpadding="4" width="100%" border="0">
-            <?php foreach($answers as $a) {
-                if (!($v = $a->display())) continue; ?>
-                <tr>
-                    <th width="100"><?php
-    echo $a->getLocal('label');
-                    ?>:</th>
-                    <td><?php
-    echo $v;
-                    ?></td>
-                </tr>
-                <?php } ?>
-            </table>
-        </td>
+            <td width="200"><?php
+echo Format::htmlchars($label);
+            ?>:</th>
+            <td><?php
+echo $v;
+            ?></td>
         </tr>
-    <?php
-    $idx++;
-    } ?>
-</table>
+<?php } ?>
+    </tbody>
+    </table>
+<?php } ?>
 <div class="clear"></div>
 
 <?php
diff --git a/scp/css/scp.css b/scp/css/scp.css
index 26369e0ec14b20d279cb2a51dc3df00cfa73aea5..2cec5526cd5ca027aae0d554951031aff58cb2da 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -845,6 +845,16 @@ h3 {
     padding:5px 0;
     color:#444;
 }
+.tixTitle {
+   padding:0 5px 0px;
+}
+.tixTitle h3 {
+   color:#444;
+   padding:0;
+   margin:0;
+   font-size:1.4em;
+   font-weight:300;
+}
 
 .has_bottom_border {
     padding-bottom:5px;
@@ -859,6 +869,17 @@ h3 {
     background:#F4FAFF;
 }
 
+.ticket_info.custom-data thead th {
+    border-bottom: 2px solid #ccc;
+    background-color: white;
+}
+.custom-data th, .custom-data td {
+    padding: 3px;
+}
+table.custom-data {
+    margin-bottom: 1em;
+}
+
 .right_align { text-align:right; }
 
 h2 .reload {