2012-12-11 4 views
0

사람들에게 컨트롤러 작업을 지시하기 위해 등록 버튼의보기에 비 형식 관련 버튼을 배치하려고하지만 계속 error500 내부 오류가 발생합니다. 어떤 아이디어가 내가 여기서 잘못하고있는 거지?CakePHP 양식 작업 버튼

<?php 
echo $this->Form->create('User'); 
echo $this->Session->flash(); 
echo $this->Form->input('username', array('label' => false, 'div' => false, 'class' => 'w-icon validate[required]')); 
echo $this->Form->input('password', array('label' => false, 'div' => false, 'class' => 'w-icon validate[required]')); 
echo $form->button('Register', array('type' => 'button', 'class' => 'button red tiny')); 
echo $this->Form->submit('Login', array('class' => 'button blue tiny')); 
echo $this->Form->end(); 
?> 

답변

2

$form->button$this->Form는 이후 1.3, 1.2 CakePHP의 구문이다.

+0

감사합니다. 버튼을 제출 버튼이 아닌 컨트롤러/액션으로 가리키는 방법은 무엇입니까? – medoix

+1

버튼은 아무 것도 가리 키지 않으며 양식을 제출합니다. 그것이 HTML이 작동하는 방식입니다. 링크를 사용하여 다른 것으로 이동할 수 있습니다. $ this-> Html-> link (...) – dogmatic69

+0

최종 솔루션은 echo $ this-> Form-> button ('register', array ('onclick'=> "location.href = '/ register' class '=>'button red tiny ')); – medoix