Help: Search Form type get (CakePHP 3)

Hi guys,

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

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

On my routes.php i have the router control:

    array('controller' => 'test', 'action' => 'search'), // Local à ser redirecionado
       '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 ??



i resolve this issue, adding a rout controller on the AppController.beforeFilter like this:

        if($this->request->is('get') && $this->request->query){
            $config['controller'] = $this->request->params['controller'];
            $config['action']     = $this->request->params['action'];                
            foreach($this->request->query as $k=>$v) $config[] = $v;
            return $this->redirect($config);

Now, all get requests like ?par1=x&par2=y&parN=z goes to /x/y/z for all actions.