_form.php 982 Bytes
<?php
    
    use yii\helpers\Html;
    use yii\widgets\ActiveForm;
    
    /* @var $this yii\web\View */
    /* @var $model artbox\order\models\OrderProduct */
    /* @var $form yii\widgets\ActiveForm */
?>

<div class="order-product-form">
    
    <?php $form = ActiveForm::begin(); ?>
    
    <?= $form->field($model, 'order_id')
             ->textInput() ?>
    
    <?= $form->field($model, 'variant_id')
             ->textInput() ?>
    
    <?= $form->field($model, 'sku')
             ->textInput([ 'maxlength' => true ]) ?>
    
    <?= $form->field($model, 'price')
             ->textInput() ?>
    
    <?= $form->field($model, 'count')
             ->textInput() ?>
  
  <div class="form-group">
      <?= Html::submitButton(
          $model->isNewRecord ? Yii::t('order', 'Create') : Yii::t('order', 'Update'),
          [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' ]
      ) ?>
  </div>
    
    <?php ActiveForm::end(); ?>

</div>