Answer the question
In order to leave comments, you need to log in
[YII 2] How to remove model name in ActiveForm?
Good afternoon, when creating a form through ActiveForm, the field names contain the model name (name="User[login]"), is it possible to somehow remove the model name so that only the field name remains (name="login") and save the ability loading data into the model via the load() method?
Answer the question
In order to leave comments, you need to log in
Override Model::formName
public function formName()
{
return '';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question