So I currently have the below code which on change I want to redirect the user to the action using the value selected.
For example I have articles/posts linked to only one category no sub sub categories. I want the dropdown menu to redirect the user to category view.
So my url will be something like /article/index?category=1
<?php $form = ActiveForm::begin(['id' => 'category-form', 'action' => '/advanced/article/Category',]); ?>
<?= $form->field($model, 'category')->dropDownList($model->categoryList,[
'prompt'=>'Select Category to view',
'onchange'=>'this.form.submit()'
]) ?>
<?php ActiveForm::end(); ?>
Currently learning yii2 so any guidance on how to accomplish this would be great.