Issue: Default string text randomly not working with fieldGroup #434

Closed
opened 2026-10-05 02:47:15 +02:00 by adam · 3 comments
Owner

Describe the bug
Default string not showing up randomly. In the example below the fieldGroup will populate, but the template will not. When I remove the hidden option the text does not appear in the front matter either.

Expected behavior
Fields with default text to populate the front matter.

    {
      "id": "two-columns-image-text",
      "labelField": "template",
      "fields": [
        {
          "title": "Template",
          "name": "template",
          "type": "string",
          "default": "two-columns-image-text",
          "hidden": true
        },
        {
          "title": "Heading",
          "name": "heading",
          "type": "string"
        },
        {
          "title": "Image",
          "name": "image",
          "type": "image"
        },
        {
          "title": "Text/Content",
          "name": "content",
          "type": "string"
        },

        {
          "title": "fieldGroup",
          "name": "fieldGroup",
          "type": "string",
          "default": "two-columns-image-text",
          "hidden": true
        }
      ]
    },

Desktop (please complete the following information):

  • OS: macOS Ventura 13.2.1
  • Visual Studio Code:
    Version: 1.76.2
    Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
    Date: 2023-03-14T17:53:46.528Z
    Electron: 19.1.11
    Chromium: 102.0.5005.196
    Node.js: 16.14.2
    V8: 10.2.154.26-electron.0
    OS: Darwin arm64 22.3.0
    Sandboxed: No
  • Front Matter (Beta) v8.4.4477137
**Describe the bug** Default string not showing up randomly. In the example below the `fieldGroup` will populate, but the `template` will not. When I remove the `hidden` option the text does not appear in the front matter either. **Expected behavior** Fields with default text to populate the front matter. ``` { "id": "two-columns-image-text", "labelField": "template", "fields": [ { "title": "Template", "name": "template", "type": "string", "default": "two-columns-image-text", "hidden": true }, { "title": "Heading", "name": "heading", "type": "string" }, { "title": "Image", "name": "image", "type": "image" }, { "title": "Text/Content", "name": "content", "type": "string" }, { "title": "fieldGroup", "name": "fieldGroup", "type": "string", "default": "two-columns-image-text", "hidden": true } ] }, ``` **Desktop (please complete the following information):** - OS: macOS Ventura 13.2.1 - Visual Studio Code: Version: 1.76.2 Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884 Date: 2023-03-14T17:53:46.528Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Darwin arm64 22.3.0 Sandboxed: No - Front Matter (Beta) v8.4.4477137 <!-- github-sync-id:1634865622 -->
adam closed this issue 2026-10-05 02:47:15 +02:00
Author
Owner

Thanks @apowell656, I will take a look a why this is happening.

Thanks @apowell656, I will take a look a why this is happening. <!-- github-comment-id:1479148291 -->
Author
Owner

Found the issue and it should now have been solved

image

Found the issue and it should now have been solved ![image](https://user-images.githubusercontent.com/2900833/226864151-216b4b0f-c6cb-4f01-adbd-dab2f5bc3c93.png) <!-- github-comment-id:1479224458 -->
Author
Owner

Fantastic! Thank you so much! It works.

Fantastic! Thank you so much! It works. <!-- github-comment-id:1480386442 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#434