예제 #1
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="entidad-form">

    <?php 
$form = ActiveForm::begin(['enableAjaxValidation' => true]);
?>

     <div class="col-md-4"> <?php 
echo $form->field($model, 'nombre')->textInput(['maxlength' => true]);
?>
</div>

      <div class="col-md-4">  <?php 
echo $form->field($model, 'tipoEntidad_tipo')->widget(Select2::classname(), ['data' => ArrayHelper::map(Tipoentidad::find()->all(), 'tipo', 'tipo'), 'language' => 'en', 'hideSearch' => true, 'options' => ['placeholder' => 'Seleccione un tipo'], 'pluginOptions' => ['allowClear' => true]]);
?>
</div>

    <div class="col-md-4">  <?php 
echo $form->field($model, 'rol')->textInput(['maxlength' => true]);
?>
</div>

     <div class="col-md-4"> <?php 
echo $form->field($model, 'correo')->textInput(['maxlength' => true]);
?>
</div>

    <div class="col-md-4">  <?php 
echo $form->field($model, 'direccion')->textInput(['maxlength' => true]);
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTipoEntidadTipo()
 {
     return $this->hasOne(Tipoentidad::className(), ['tipo' => 'tipoEntidad_tipo']);
 }