我有一个注册表格,我在login.ctp中有这个表格,它的外观如下:
<--Here is the login code-->
---
<--Here is the end of login code-->
<--Here start the Singup code-->
<div class="form-bottom">
<?= $this->Form->create('Registration', array('url' => array('controller' => 'users', 'action' => 'singup')));?>
<form role="form" action="" method="post" class="registration-form">
<div class="form-group">
<?= $this->Form->control('email', array('placeholder'=>'Email','class'=>'form-email form-control'));?>
</div>
<div class="form-group">
<?= $this->Form->input('password', array('type'=>'password','placeholder'=>'Password','class'=>'form-password form-control'));?>
</div>
<div class="form-group">
<?= $this->Form->input('cPassword', array('label' => 'Confirm Password','placeholder'=>'Confirm Password', 'title' => 'Confirm password','class'=>'form-password form-control', 'type'=>'password'));?>
</div>
<?= $this->Form->submit('Singup', array('class'=>'btn btn-outline-primary my-2 my-sm-0','style'=>'float:right'));?>
<?= $this->Form->end();?>
问题是当我填写电子邮件,密码和确认密码输入时,当我按下单键按钮时它的工作,但当我给出一些错误(没有通过验证)电子邮件或密码和类似的东西,它重定向我用户/单身。我想要的是禁用重定向,我该怎么做?