Added basic documentation for select widget (#806)

This commit is contained in:
Alexander Kushi-Willis 2017-12-04 13:51:31 -05:00 committed by Jessica Parsons
parent 8b24d1c12d
commit 8e529ee7cc

View File

@ -22,6 +22,23 @@ Widgets define the data type and interface for entry fields. Netlify CMS comes w
Were always adding new widgets, and you can also [create your own](/docs/extending)!
### Select Widget
The select widget allows you to pick a string value from a drop down menu
```yaml
collections:
- name: posts
label: Post
folder: "_posts"
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
create: true
fields:
- {label: Title, name: title, widget: string, tagname: h1}
- {label: Body, name: body, widget: markdown}
- {label: Align Content, name: align, widget: select, options: ['left', 'center', 'right']}
```
### List Widget
The list widget allows you to map a user-provided string with a comma delimiter into a list. Consider the following example that also demonstrates how to set default values: