yii2 - Catch button in controller -


i have form in view

<?php     $form = activeform::begin();     $items = [201 => 'Тест', 202 => 'Тест2'];     echo html::dropdownlist('list', 'null', $items); ?>  <div class="form-group">     <?=     html::submitbutton(         'Удалить отмеченные',[         'data' => ['confirm' => 'Вы действительно хотите перенести отмеченные товары в выбранную категорию?'],         'name' => 'deleteproduct',         'value' => 'delproduct', // добавить value         'class' => 'btn btn-danger'     ])     ?> </div>  <?php activeform::end(); ?> 

and in controller

if (yii::$app->request->post('deleteproduct')) {     $lk_number = $_post['list'];      print_r($lk_number);exit(); } 

but when click on button there no catch in controller. wrong?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -