use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; /* @var $this yii\web\View */ /* @var $model app\models\Cuenta */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="cuenta-form"> <?php $listContactos = ArrayHelper::map(\app\models\Contacto::findAll(['baja' => 0]), 'id', 'nombres'); ?> <?php $listPlanes = ArrayHelper::map(\app\models\Plan::findAll(['baja' => 0]), 'id', 'nombre'); ?> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'id_contacto')->dropDownList($listContactos, ['prompt' => '--SELECCIONE--']); ?> <?php echo $form->field($model, 'id_plan')->dropDownList($listPlanes, ['prompt' => '--SELECCIONE--']); ?>