* All portions are Copyright (C) Adam Ben Hur. * All Rights Reserved. ************************************************************************************/ use kartik\select2\Select2; $form = kartik\form\ActiveForm::begin(array('id' => 'bank-name-form', 'enableAjaxValidation' => false)); ?> <?php echo $form->errorSummary($model); ?> <?php //echo $form->field($model,'id',array('class'=>'span5')); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'type_id')->widget(Select2::classname(), ['data' => \yii\helpers\ArrayHelper::map(app\models\Acctype::find()->All(), 'id', 'name')]); ?> <div class="form-actions"> <?php echo \yii\helpers\Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => 'btn btn-success']); ?> </div> <?php kartik\form\ActiveForm::end();
<?php $form = kartik\form\ActiveForm::begin(array('id' => 'accounts-form', 'enableAjaxValidation' => true, 'options' => array('enctype' => 'multipart/form-data'))); ?> <?php echo $form->errorSummary($model); ?> <?php echo \yii\helpers\Html::hiddenInput("companyId", $model->companyId); foreach ($model->accDesc as $type => $desc) { //$model->accTypeIndex[$type]; //echo $form->dropDownListRow($model,'id6111',\yii\helpers\ArrayHelper::map(AccId6111::find()->All(), 'id', 'name')); echo \yii\helpers\Html::dropDownList("SwitchType[" . $model->accTypeIndex[$type] . "]", 0, \yii\helpers\ArrayHelper::map(app\models\Acctype::find()->All(), 'id', 'name')); echo $desc . "<br/>"; // $this->accDesc[$acc->type]=$acc->name; } ?> <div class="form-actions"> <?php echo \yii\helpers\Html::submitButton(Yii::t('app', 'Go'), ['class' => 'btn btn-success']); ?> </div> <?php kartik\form\ActiveForm::end(); app\widgets\MiniForm::end();