搜索表单类型get(CakePHP 3)

i have a simple search form with method get like this:

<?= $this->Form->create('Search',['type'=>'get']) ?>
<fieldset>
    <legend><?= __('Search') ?></legend>
    <?php
        echo $this->Form->input('id');
    ?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>

On my routes.php i have the router control:

$routes->connect(
    '/test/search/:id',
    array('controller' => 'test', 'action' => 'search'), // Local à ser redirecionado
    array(
       'pass' => array('id'),
       'id' => '[0-9]+'
));

To control my url like: /test/search/:search_id.

The problem is my form send the request to /test/search?id=:search_id. What i need to do, to form send to the correct url: /test/search/:search_id ??

Thanks.

This can be solved using simple approach

First use POST method

<?= $this->Form->create('Search',['type'=>'post']) ?>
<fieldset>
    <legend><?= __('Search') ?></legend>
    <?php
        echo $this->Form->input('id');
    ?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>

in your controller

use Cake\Event\Event;

public function beforeFilter(Event $event){
    parent::beforeFilter($event);
        if($this->request->is('post') && isset($this->request->data['id']){
            return $this->redirect([
                'action' => 'search', 
                $this->request->data['id']
            ]);
        }

    }

and

public function search($id = null){
    //....
}