cakephp 2.x ajax form in bootstrap modal -


i have ajax form in modal bootstrap window doesn't load form, instead of loading hidden input , form missing here code:

<?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> 

and here generated:

<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] 


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -