public function parseUploadData($data)
 {
     if (strpos($data, 'fileInputCluster') !== FALSE) {
         if (!isset($_SESSION['ajax_upload_auth_code'])) {
             $_SESSION['ajax_upload_auth_code'] = RemoteViewForm::generateUploadAuthCode();
         }
         $search = '@<input type="file" id="([^"]*)" name="[^"]*" class="([^"]*)" />@';
         $replace = '<iframe src="ext/upload.php?session_id=' . session_id() . '&upload_dir=../' . FileUtility::UPLOAD_DIR . '&id=\\1&class=\\2" frameborder="0"></iframe>';
         $data = preg_replace($search, $replace, $data);
         $search2 = '@<input type="hidden" name="([^"]*)_exists" value="([^"]*)" />@';
         $replace2 = '<input type="hidden" id="\\1" name="\\1" value="\\2" />';
         $data = preg_replace($search2, $replace2, $data);
     }
     return $data;
 }
 public function viewForm($name)
 {
     ob_start();
     Display::viewForm($name);
     $data = ob_get_clean();
     $data = RemoteViewForm::parseUploadData($data);
     echo $data;
 }