Answer the question
In order to leave comments, you need to log in
How in the GII crud one to many generator in _form to display not input but radio with all associated values?
I'm trying to generate CRUD functionality for two tables through Gii.
After generating models and CRUD in the view, everything is displayed normally, but without taking into account dependencies. Those. in principle, I want to display in the “select” edit, and in it the names from the Manufacturers table (and “input” is displayed). And just for example, you need to hang a radio button. I can't find how to do it yet. I suspected that Yii2 Gii does this automatically.
How to make select, radio button generated in Gii CRUD or is it manual only?
PS in the product model, an association was generated for the Manufacturer
public function getIdManufacturer()
{
return $this->hasOne(YiiManufacturer::className(), ['id_manufacturer' => 'id_manufacturer']);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question