Example #1
0
<div id="product-form">

    <?php 
$form = ActiveForm::begin();
?>
    
    <?php 
echo $form->field($model, 'sku')->textInput(['maxlength' => 100]);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 100]);
?>
    
    <?php 
echo $form->field($model, 'scate_id')->dropDownList(Category::listCategoriesWithSub());
?>

    <?php 
echo $form->field($model, 'thumbnail', ['inputOptions' => ['id' => 'browse-img'], 'inputTemplate' => '<div class="input-group">{input}<span class="input-group-btn"><button type="button" id="browse-btn" class="btn btn-default"><i class="fa fa-search"></i></a></span></div>'])->textInput(['maxlength' => 255]);
?>
    
    <?php 
echo $form->field($model, 'price')->textInput(['maxlength' => 20]);
?>

    <?php 
echo $form->field($model, 'description')->textarea();
?>
    
    <?php