Multi step form in cakephp3

hellow guys am member cakephp community from ETHIOPIA stuck at mult step from using cakephp3 in my project please help me?

i use this tutorial

my controller


this is the users controllers for citizens management system

path: src/Controller/UsersController.php
by: Ermias mesfin
used_Table: users
Templates: src/Templates/Users/*.ctp
namespace App\Controller;

//used classes

use App\Controller\AppController;
//file system folder
use Cake\Filesystem\Folder;
use Cake\Utility;
use Cake\Event\Event;
use Cake\Http\Session;

class UsersController extends AppController{

	//this get the session beforeRender the layout

	public function beforeRender(Event $event){
        $session = $this->getRequest()->getSession();
		$params = $session->read('form.params');
		$this->set('params', $params);

public function msfIndex(){

	$session = $this->getRequest()->getSession();



public function msfsetup(){

	$session = $this->getRequest()->getSession();

	$cmsUsersFolder = new Folder('App'.DS.'Template'.DS.'Users');
	$steps = count($cmsUsersFolder->find('msfstep*\.ctp'));
	$session->write('form.params.steps', $steps);
	$session->write('form.params.maxProgress', 0);
	$this->redirect(array('action'=>'msfstep', 1));


public function msfstep($stepNumber){ 
	//check if view file exist for this step

	$session = $this->getRequest()->getSession();


$maxAllowed = $session->read('form.params.maxProgress') + 1;
if ($stepNumber > $maxAllowed)
	$session->write('form.params.currentStep', $stepNumber);
//check if data submitted

//merge data

		$privSessionData = $session->read('');
		$currentSessionData = Hash::merge((array)$privSessionData, $this->request->data);

		if($stepNumber < $session->read('form.params.steps')){
			$this->Session->write('', $currentSessionData);
			$session->write('form.params.maxProgress', $stepNumber);
			$this->redirect(['action'=>'msfstep', $stepNumber + 1]);
			$session->setFlash('account Created');


	$this->request->data = $session->read('');





my template


<?= $this->Form->create();?>
<?php echo $this->Form->control('username');?>
<?php echo $this->Form->control('e_mail');?>
<?php echo $this->Form->control('phonenumber');?>
<?php echo $this->Form->control('password');?>
<?= $this->Form->end('Next step'); ?>

and i get this error please help me???

The Form->end() don’t display the button.
Use echo $this->Form->button('Next step') and echo $this->Form->end()

i try adding button but the error stays.

what other thing should i try?
when i live the
<?= $this->Form->end();?> empty it ridrects me always to index

when i add $this->Form->end('Next step') the same error raises

You based your code on an example from 2012 and Cake 2.
Version 3 don’t have same methods.

The problem is not the view or form, it’s the logic.
try to debug your vars, sessions, etc and write new code for Cake3 by inspiring you of the example, not copy/paste it.