Hi,
I have the following form to the address below:
http://localhost/myapp/web/index.php?r=cashbook%2Faccomplishment
<?php $form = ActiveForm::begin([
'id' => 'accomplishment-form',
'options' => ['class' => 'form-horizontal'],
'action' => Url::to(['/cashbook/accomplishment']),
'method' => 'get',
]); ?>
<?= $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(Category::find()->where(['user_id' => Yii::$app->user->identity->id])->orderBy("desc_category ASC")->all(), 'id_category', 'desc_category'),['onchange'=>'this.form.submit()','prompt'=>'-- Select --']) ?>
<?php ActiveForm::end(); ?>
Who processes and generates the following URL:
http://localhost/myapp/web/index.php?r=cashbook%2Faccomplishment&Cashbook%5Bcategory_id%5D=18
But I need only the category_id value (selected in dropDownList). That is, the URL should be:
http://localhost/myapp/web/index.php?r=cashbook%2Faccomplishment&category_id=19
How to stay that way or get just the category_id