2011-11-29 54 views
0

表單標籤在CakePHP視圖文件中被剝離。表單標籤在Cake Php中被剝離

在 'login.ctp'(佈局視圖)

<div id="test"> 

     <?php echo $this->Form->create(); ?> 
      Test form Elements 
     <?php echo $this->Form->end(); ?> 

    </div> 

當螢火控制檯檢查僅創建下面標籤

<div id="test"> 

     <div style="display:none;"><input type="hidden" value="POST" name="_method"></div> 

     Test form Elements 
    </div> 



// "<div style="display:none;"><input type="hidden" value="POST" name="_method"></div>". This div tag is automatically created. 

我還視圖創建一個 'inner.ctp' 上的元件並嘗試從佈局視圖(login.ctp)調用echo $ this-> element('inner'),但導致同樣的問題

任何人都可以幫忙嗎?

回答

0

我幾乎可以肯定,你有你的頁面上的另一種形式,可能在你的佈局,那你不收...

echo $this->Form->end(); 

如果不是這種情況,我建議得到latest stable version of Cake 1.3並覆蓋您當前的一個。