引导模式下的cakephp 2.x ajax表单

引导模式下的cakephp 2.x ajax表单,cakephp,twitter-bootstrap,modal-dialog,Cakephp,Twitter Bootstrap,Modal Dialog,我在模式引导窗口中有一个ajax表单,但它没有加载表单,而是加载了一个隐藏的输入,表单丢失了 这是我的密码: <?php $data = $this->Js->get('#UserSaveProjectsForm')->serializeForm(array('isForm' => true, 'inline' => true)); $this->Js->get('#UserSaveProjectsForm')->event(

我在模式引导窗口中有一个ajax表单,但它没有加载表单,而是加载了一个隐藏的输入,表单丢失了 这是我的密码:

<?php  $data = $this->Js->get('#UserSaveProjectsForm')->serializeForm(array('isForm' => true, 'inline' => true));
$this->Js->get('#UserSaveProjectsForm')->event(
      'submit',
      $this->Js->request(
        array('action' => 'save_projects'),
        array(
                'update' => '#commentStatus',
                'data' => $data,
                'async' => true,    
                'dataExpression'=>true,
                'method' => 'POST'
            )
        )
    );?>

<div id="myModal" class="modal hide fade" style="width: 335px; left:56%;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove icon-black"></i></button>
    <h3 id="myModalLabel">Assign Projects</h3>
</div>
<div class="modal-body" style="width: 300px;">
    <?php echo $this->Form->create('User', array( 'action'=> 'save_projects' ,'class' => 'form-horizontal validationEngine ')); ?>
    <?php  echo $this->Form->input('User.id', array('type' =>'hidden','label' => false)); ?>
    <?php  echo $this->Form->input('Agentgroup', array('options'=> $agent_groups,'multiple'=>true ,'class' =>'multiple','label' => false)); ?>
    <?php echo $this->Form->end(__('Assign')); ?> 
<?php echo $this->Js->writeBuffer(); ?>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>

分配项目
取消

以下是生成的内容:

<div style="width: 300px;" class="modal-body">
    <div style="display:none;"><input type="hidden" value="POST" name="_method"></div>      <input type="hidden" id="UserId" value="30" name="data[User]


首先,试着让表单在页面上回音,然后找出Javascript的情况谢谢Dave的回复,我刚刚修复了错误。是页面中的另一个表单导致了错误。出于某种原因,我没有加上。