如何根据选定的下拉列表获取自动编号

I'm not good in English. I'm new newbie in PHP and YII2 too.

The picture below here. That my question.

How to get value from selected Drop Drown List for generate auto number code and increment(+1) for new summit value.

After submit form will generate auto number code from selected drop down list.

Thank you in advance.

enter image description here

I try to learn from https://github.com/mdmsoft/yii2-autonumber, but too hard.

your model

class MyModel extends ActiveRecord
{
    public $subCode1; // AA or BB
    public $subCode2; // 01, 02, 03, ...

    public function rules()
    {
        return [
            [['subCode1', 'subCode2'], 'safe'],
            [['number'] , 'autonumber', 'digit'=>4, 'format'=>function(){
                return $this->subCode1 . $this->subCode2 . '?';
            }]
        ];
    }
}