Hello i am using a dropdownlist in a form and it works correctly but when i send the information to in the gridView it shows me only the id of the selection and i wnat to show the text of the selection. How can i do it?
my form
<?php $form = ActiveForm::begin([‘options’ => [‘enctype’=>‘multipart/form-data’]]); ?>
<?php echo $form->field($model, ‘tipo’)->dropDownList(ArrayHelper::map( tipo::find()->all(), ‘id’, ‘tipo’), [‘id’=>‘tipo’]);?>
<?=$form->field($model, ‘departamento’)->dropDownList(ArrayHelper::map( departamento::find()->all(), ‘id’, ‘departamento’), [‘id’=>‘departamento’]);?>
<?= $form->field($model, ‘descripcion’)->textInput([‘maxlength’ => true]) ?>
my index
<?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'id', 'tipo', 'departamento', 'descripcion', 'estatus', 'Imagen',