We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6418b6c commit e9e3b31Copy full SHA for e9e3b31
1 file changed
backend/forms.md
@@ -440,6 +440,26 @@ status_type:
440
draft: [Draft, icon-clock-o]
441
```
442
443
+#### Add option grouping (optgroup) to dropdown options
444
+
445
+In order to add option grouping, use a multidimensional array like below:
446
447
+```yaml
448
+status_type:
449
+ type: dropdown
450
+ label: Blog Post Status
451
+ options:
452
+ Group1:
453
+ opt1: Option 1
454
+ opt2: Option 2
455
+ opt3: Option 3
456
+ Group2:
457
+ opt4: Option 4
458
+ opt5: [Option 5, icon-check-circle]
459
+ opt6: Option 6
460
+```
461
+>**NOTE:** individual items in the groups can also use icons or images as shown in "Option 5" above.
462
463
To define the behavior when there is no selection, you may specify an `emptyOption` value to include an empty option that can be reselected.
464
465
```yaml
0 commit comments