Netlify-cms: Form splitting into tabs

Created on 18 Sep 2018  路  3Comments  路  Source: netlify/netlify-cms

I propose a form splitting technique into tabs. Maybe some setting in the collection that allows me to send one field to a different tab.

I have a Posts collection and it contains a lot of fields (meta description & keywords, excerpt, content, title, tags. category, publish date etc.).

Example yaml:

- name: posts
  label: Posts
  label_singular: Post
  folder: static/content/collections/posts
  create: true
  slug: "{{year}}-{{month}}-{{day}}-{{slug}}/"
  fields:
  - {label: "Title", name: "title", widget: "string"}
  - {label: "Publish Date", name: "date", widget: "datetime"}
  - label: "Meta"
    name: "meta"
    widget: "object"
    form_stack: "Meta"
    fields:
    - label: Meta keywords
      name: meta_keywords
      widget: string
      required: false
    - label: Meta description
      name: meta_description
      widget: string
      required: false
      hint: "If left empty we will use the excerpt instead"

Notice the form_stack: "Meta" field. In admin this will form a separate tab named "Meta" and add there all the fields under this stack. Everything without a form_stack field will be sent to Main or something. This would allow us to let that form breathe a little.

ueditor feature pinned

Most helpful comment

It's not just meta tags. That was just an example. My form now has many other fields and will receive many more such as isPage, isFeatured, coverImage, coverImageAlt, categories, tags, authors, excerpt etc.

The form is getting ridiculously long and I've just started. All of the above make sense. We should be able to group stuff together and let that form be friendlier.

Example from prismic.io:

screenshot from 2018-10-24 06-04-58

All 3 comments

We've talked about handling meta tag content separate from standard content, but we won't likely go with a tabbed interface. Definitely need to discuss a proper UI approach for it, I'd love to see it in place.

It's not just meta tags. That was just an example. My form now has many other fields and will receive many more such as isPage, isFeatured, coverImage, coverImageAlt, categories, tags, authors, excerpt etc.

The form is getting ridiculously long and I've just started. All of the above make sense. We should be able to group stuff together and let that form be friendlier.

Example from prismic.io:

screenshot from 2018-10-24 06-04-58

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings