Exemple #1
0
        <?php 
//$form->field($model, 'id_kelas')->textInput(['maxlength' => true])
?>
        <!-- ?= $form->field($model, 'id_kelas')->dropDownList(
                                                \app\models\Data::Kelas(), 
                                                ['prompt'=>'Pilih Kelas...'])->label('Kelas'); ?> -->
        <?php 
// Normal select with ActiveForm & model
echo $form->field($model, 'id_kelas')->widget(Select2::classname(), ['data' => \app\models\Data::Kelas(), 'language' => 'en', 'options' => ['placeholder' => 'Pilih Kelas...'], 'pluginOptions' => ['allowClear' => true]])->label('Kelas');
?>
            

        <?php 
if ($model->isNewRecord) {
    // Normal select with ActiveForm & model
    echo $form->field($nilai, 'tahun_ajaran')->widget(Select2::classname(), ['data' => \app\models\Data::tahun_ajaran(), 'language' => 'en', 'options' => ['placeholder' => 'Pilih...'], 'pluginOptions' => ['allowClear' => true]])->label('Tahun Ajaran');
}
?>
            

        </div>
    <div class="row">
        <div class="col-sm-3">
        <?php 
echo $form->field($model, 'password')->passwordInput(['maxlength' => true]);
?>

        <?php 
echo $form->field($model, 'email')->textInput(['maxlength' => true]);
?>