Ejemplo n.º 1
0
			<div class="col-lg-offset-1 col-lg-11">
				<?php 
echo $form->field($model, 'yearOfBirth')->textArea()->label(false)->dropDownList(DateModel::getYears(), ['prompt' => 'Год']);
?>
			</div>
		</div>
		<?php 
echo $form->field($model, 'phoneInput');
?>
		<?php 
echo $form->field($model, 'country')->dropDownList(CountryModel::getCountries());
?>
		
		
		<?php 
echo $form->field($model, 'school', ['selectors' => ['input' => '#cat-id']])->dropDownList(School::getDropDownList(), ['id' => 'cat-id', 'prompt' => 'Выберите школу']);
?>
		<!--?= $form->field($model, 'school')->dropDownList(['1'=>'test','2'=>School::getDropDownList()], ['id'=>'cat-id'])?-->
		
		<?php 
echo Html::hiddenInput('input-type-1', $model->group, ['id' => 'input-type-1']);
?>
		<?php 
echo Html::hiddenInput('input-type-2', 'Additional value 2', ['id' => 'input-type-2']);
?>
				
		<?php 
echo $form->field($model, 'group', ['selectors' => ['input' => '#subcat-id']])->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'options' => ['id' => 'subcat-id'], 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => Yii::t('registration', 'Groups'), 'initialize' => true, 'url' => Url::to(['/registration/subcat']), 'params' => ['input-type-1', 'input-type-2'], 'loadingText' => Yii::t('registration', 'Loading...')]]);
?>
			
		
Ejemplo n.º 2
0
    <h2><?php 
echo Yii::t('newrequest', 'New Request');
?>
</h2>
	
    <?php 
$form = ActiveForm::begin(['id' => 'newrequest-form', 'options' => ['class' => 'form-horizontal'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-8\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-1 control-label']]]);
?>
	
	<?php 
$this->params['breadcrumbs'] = [['label' => Yii::t('guestlk', 'Guest cabinet'), 'url' => ['guestlk/index', 'username' => $model->username]], $this->title];
?>


		<?php 
echo $form->field($model, 'school')->dropDownList(School::getDropDownList(), ['id' => 'cat-id']);
?>
		
		<?php 
echo Html::hiddenInput('input-type-1', 'Additional value 1', ['id' => 'input-type-1']);
?>
		<?php 
echo Html::hiddenInput('input-type-2', 'Additional value 2', ['id' => 'input-type-2']);
?>
				
		<?php 
echo $form->field($model, 'group')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'options' => ['id' => 'subcat-id'], 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => Yii::t('registration', 'Groups'), 'initialize' => true, 'url' => Url::to(['/newrequest/subcat']), 'params' => ['input-type-1', 'input-type-2'], 'loadingText' => Yii::t('registration', 'Loading...')]]);
?>
		
		
		<?php