Skip to content

Commit 3b0a1b5

Browse files
author
Lucas Frey
committed
update readme
1 parent c8aa817 commit 3b0a1b5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

readme.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Conditional fields is a custom extension that allow you to hide and show fields
66

77
# Usage
88
### Type dropdown
9-
Add a `type` dropdown that will host the event listener and will trigger the hide and show fields
9+
Add a `type` dropdown to your collection. It will host the event listener and will trigger the hide and show fields
1010
e.g:
1111
Type:
1212
- editorial
@@ -15,8 +15,8 @@ Type:
1515
- ...
1616

1717
### Field naming convention
18-
Once you have setup your type field, you need to name your fields like the above
19-
(example with a collection named `blocks`, with `blocks`, you will need to start your field name with the singular `block`)
18+
Once you have setup your `type` field, you need to name your fields like the above
19+
(example with a collection named `blocks` you will need to start your field name with the singular `block`)
2020

2121
| collection | type | field |
2222
|------------|-----------|---------|
@@ -25,6 +25,14 @@ Once you have setup your type field, you need to name your fields like the above
2525
| block | image | picture |
2626
| block | image | alt |
2727

28+
So the fields in the database should be like
29+
```
30+
block_editorial_text
31+
block_editorial_intro
32+
block_image_picture
33+
block_image_alt
34+
```
35+
2836
With that config, if you select the type `editorial` in the dropdown, only the `text` and `intro` fields will appear on the screen.
2937

3038
### Import conditional-fields into the collection

0 commit comments

Comments
 (0)