Example #1
0
?>

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

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

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

            <?php 
echo $form->field($model, 'status')->dropDownList(StatusBehavior::statusList(Customer::className()), ['style' => 'width:200px;']);
?>

        </div>
    </div>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdCustomer()
 {
     return $this->hasOne(Customer::className(), ['id_customer' => 'id_customer']);
 }