0

モーダルブートストラップウィンドウに 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]
4

0 に答える 0