Netlify-cms: Hidden fields don't work when added through a list widget with variable types

Created on 8 Jun 2019  路  4Comments  路  Source: netlify/netlify-cms

Describe the bug

When using the new list widget with variable types, hidden fields don't work. When you add a new item the (nested) hidden fields don't get set to the default value.

To Reproduce

- label: Items
  name: items
  widget: list
  type: list
  types:
    - label: Item
      name: item
      widget: object
      type: some_type
      fields:
        - label: Name
          name: name
          widget: string
        - label: Subtype
          name: subtype
          widget: hidden
          default: sponsor_item
          required: true
  # more items

Expected behavior

It should set the default values.

Applicable Versions:

  • Netlify CMS app version: 2.9.1

Most helpful comment

@erquhart @LesterGallagher #2374 did not fix this issue, sorry. I will send in another PR that will address this issue and #2378

All 4 comments

I believe #2374 will address this.

Fixed in #2374

@erquhart @LesterGallagher #2374 did not fix this issue, sorry. I will send in another PR that will address this issue and #2378

Thanks so much @barthc

Was this page helpful?
0 / 5 - 0 ratings