/** * @return \yii\widgets\ActiveField */ public function renderForActiveForm() { $field = $this->activeForm->field($this->model->relatedPropertiesModel, $this->property->code); if (!$field) { return ''; } $this->postFieldRender($field); return $field; }
public function run() { parent::run(); AdminFormAsset::register($this->view); if ($this->useAjaxSubmit) { $this->registerJs(); } if ($this->usePjax) { Pjax::end(); } }
<? if ($propertiesValues) : ?> <div class="form-group"> <div class="row"> <div class="col-md-12"> <?php echo $form->field($widget->searchOfferRelatedPropertiesModel, $property->code)->dropDownList(\yii\helpers\ArrayHelper::merge(['' => ''], \yii\helpers\ArrayHelper::map($propertiesValues, 'value', 'value'))); ?> </div> </div> </div> <? endif; ?> <? endif; ?> <? endif; ?> <? endforeach; ?> <? endif; ?> <button class="btn btn-primary" style="display: none;"><?php echo \skeeks\cms\shop\Module::t('app', 'Apply'); ?> </button> <? \skeeks\cms\base\widgets\ActiveForm::end(); ?>
public function init() { parent::init(); echo \yii\helpers\Html::hiddenInput("sx-model-value", $this->modelForm->id); echo \yii\helpers\Html::hiddenInput("sx-model", $this->modelForm->className()); }
public function __construct($config = []) { $this->enableAjaxValidation = true; parent::__construct($config); }