/**
  * Lists all Tblcountries models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Tblcountries::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Ejemplo n.º 2
0
?>

<div class="tblorders-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'client_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Tblclients::find()->all(), 'client_id', 'Names'), 'options' => ['placeholder' => 'Select client'], 'pluginOptions' => ['allowClear' => true]]);
?>
    <?php 
echo $form->field($model, 'country_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Tblcountries::find()->all(), 'country_id', 'country_name'), 'options' => ['placeholder' => 'Select country'], 'pluginOptions' => ['allowClear' => true]]);
?>


    <?php 
echo $form->field($model, 'rubric')->textarea(['rows' => 3]);
?>

    <?php 
echo $form->field($model, 'Other_instructions')->textarea(['rows' => 2]);
?>

    <?php 
echo '<label class="control-label">Add Attachments</label>';
echo $form->field($model, 'files')->widget(FileInput::classname(), ['options' => ['multiple' => true]]);
?>