
Yii2 dropdown select optgroup
I have struggled a lot, while figuring this out. Now I want to share what I managed to do. Situation: We have posts, and categories, each post attached to one category. Categories have 2 levels: parent and child. Post can be attached to child category only. Problem: Get the select dropdown box of categories with optgourp grouppings. […]