File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Conditional fields is a custom extension that allow you to hide and show fields
6
6
7
7
# Usage
8
8
### 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
10
10
e.g:
11
11
Type:
12
12
- editorial
15
15
- ...
16
16
17
17
### 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 ` )
20
20
21
21
| collection | type | field |
22
22
| ------------| -----------| ---------|
@@ -25,6 +25,14 @@ Once you have setup your type field, you need to name your fields like the above
25
25
| block | image | picture |
26
26
| block | image | alt |
27
27
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
+
28
36
With that config, if you select the type ` editorial ` in the dropdown, only the ` text ` and ` intro ` fields will appear on the screen.
29
37
30
38
### Import conditional-fields into the collection
You can’t perform that action at this time.
0 commit comments