Jake Vanderwerf
2026-09-14 7935d26cd16a4f8f69a59a44e27a7263b60e54bf
inc/meta/Form.php
@@ -850,15 +850,11 @@
         public static function renderExistingAttachment(int $attachmentId, string $subtype):string
         {
            switch ($subtype){
               case 'video':
                  return static::renderVideoPreview($attachmentId);
               case 'document':
               case 'file':
                  return static::renderFilePreview($attachmentId);
               default:
                  return static::renderImagePreview($attachmentId);
            }
            return match ($subtype) {
               'video' => static::renderVideoPreview($attachmentId),
               'document', 'file' => static::renderFilePreview($attachmentId),
               default => static::renderImagePreview($attachmentId),
            };
         }
         protected static function renderUploadItemStart(?int $attachmentId = null):string
         {
@@ -1034,7 +1030,7 @@
            }
            public static function renderImagePreview(?int $ID = null, ?array $additionalFields = null, bool $isTemplate = false):string
            {
               $out = static::renderUploadItemStart($ID, $isTemplate);
               $out = static::renderUploadItemStart($ID);
               //add image preview
               if ($ID) {
                  $out .= jvbFormatImage($ID, 'tiny', 'medium');
@@ -1382,8 +1378,15 @@
                  $plural
               );
               break;
            default:
               $attr = false;
               $single = false;
               $plural = false;
         }
         if (!$attr || !$single || !$plural) {
            return '';
         }
         $dataAttrs = [];
         if ($config['update']) {
            $dataAttrs[] = 'data-update="false"';
@@ -1634,7 +1637,7 @@
                  $values = array_filter(array_values($values));
                  return implode(', ', $values) ?: 'New Item';
               default:
                  if (strpos($tagFormat, '{') !== false) {
                  if (str_contains($tagFormat, '{')) {
                     $text = $tagFormat;
                     foreach ($values as $key => $value) {
                        $text = str_replace('{'.$key.'}', $value, $text);