I understand. I just don't like withForm->form.. if we create form, why can't we use methods to create elements on it. Or can forget about that, but what I can say for sure is that juniors will be confused about ->withForm->form
you want: field()
return Yii::createObject(ArrayHelper::merge($config, $ options, [
'model' => $model,
'attribute' => $attribute,
'form' => $this,
]));