/** * @return \yii\db\ActiveQuery */ public function getProducer() { return $this->hasOne(Produce::className(), ['id' => 'producer_id']); }
</div> <div class="col-md-8"> <div class="form-group"> <?php echo $form->field($model, 'title')->textInput(['maxlength' => 255]); ?> </div> <div class="row"> <div class="form-group col-md-6"> <?php echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(Category::find()->notParent()->all(), 'id', 'title'), ['prompt' => Yii::t('view', 'Select A Category')]); ?> </div> <div class="form-group col-md-6"> <?php echo $form->field($model, 'producer_id')->dropDownList(ArrayHelper::map(Produce::find()->all(), 'id', 'title'), ['prompt' => Yii::t('view', 'Select A Produce')]); ?> </div> </div> <div class="form-group"> <?php echo $form->field($model, 'short_description')->textArea(); ?> </div> <div class="form-group"> <?php echo $form->field($model, 'description')->textArea(); ?> </div> <div class="row"> <div class="form-group col-md-4">
<div class="col-xs-12 well"> <div class="col-xs-12"> <div class="row"> <?php echo $form->field($model, 'search_key', ['options' => ['tag' => 'div', 'class' => 'col-xs-4'], 'template' => '{input}'])->textInput(['placeholder' => $model->getAttributeLabel('search_key')])->label(false); ?> <?php echo $form->field($model, 'search_key', ['options' => ['tag' => 'div', 'class' => 'col-xs-8'], 'template' => '{input}'])->textInput(['placeholder' => $model->getAttributeLabel('search_key')])->label(false); ?> </div> <div class="row"> <?php echo $form->field($model, 'category', ['options' => ['tag' => 'div', 'class' => 'col-xs-4'], 'template' => '{input}'])->dropDownList(ArrayHelper::map(Category::find()->notParent()->asArray()->all(), 'id', 'title'), ['prompt' => $model->getAttributeLabel('category')])->label(false); ?> <?php echo $form->field($model, 'producer', ['options' => ['tag' => 'div', 'class' => 'col-xs-4'], 'template' => '{input}'])->dropDownList(ArrayHelper::map(Produce::find()->asArray()->all(), 'id', 'title'), ['prompt' => $model->getAttributeLabel('producer')])->label(false); ?> <div class="col-xs-4"> <?php echo Html::submitButton('Search', ['class' => 'btn btn-success', 'name' => 'search-button']); ?> </div> </div> </div> </div> <?php ActiveForm::end(); ?>