2011-11-29 56 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并覆盖您当前的一个。