Esempio n. 1
0
// echo $form->field($model, 'first_name')
?>
    <?php 
echo $form->field($model, 'gender')->radioList(['1' => 'Female', '2' => 'Male', '' => 'Any']);
?>
<!--    --><?php 
// echo $form->field($model, 'last_name')
?>
<!--    --><?php 
//echo $form->field($model, 'bd_date')
?>
    <p>Age</p>
 <label>  From: <input type="text" style="width: 50px;display: inline;" class="form-control" name="userSearch[min_year]" id="min_year"></label><label>To:<input type="text" style="width: 50px;display: inline;" class="form-control" name="userSearch[max_year]" id="max_year"></label>

    <?php 
echo $form->field($model, 'country')->dropDownList(\yii\helpers\ArrayHelper::map(\frontend\models\Countries::find()->all(), 'country_name', 'country_name'), ['prompt' => 'Select Country']);
?>



    <div class="form-group">
        <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
<!--        --><?php 
//= Html::resetButton('Reset', ['class' => 'btn btn-default'])
?>
    </div>

    <?php 
ActiveForm::end();
Esempio n. 2
0
 public static function getCountryNameShort($countryId)
 {
     $countryName = Countries::find()->select(['sortname'])->asArray()->where(['id' => $countryId])->one();
     return $countryName['sortname'];
 }