Doh! Putting the form tag inside the table instead of wrapping it is a
no no.

On Oct 7, 9:39 am, nightfallvt <[EMAIL PROTECTED]> wrote:
> My index tables have aformbelow the heading to allow users to filter
> data. When using ajax pagination theformdisappears after the first
> request. Normal pagination works fine. Theformdoes show up in the
> htmlreturnedby ajax but it almost seems as if its getting rendered
> off the screen. I have even tried standard and ajax forms for the
> filtering. Snippet of my pagination, heading and filterform($columns
> is an array of key-value pairs for the fields to display):
>
> <tr>
>   <?php if($this->params['action'] == 'index'): ?>
>     <?php $paginator->options(array('update'=>'centerColumn','indicator' => 
> 'loading'));?>
>
>       <?php foreach($columns as $column): ?>
>         <th>
>           <?php
>             if(array_key_exists('sort',$paginator->params['named'])){
>               if($paginator->params['named']['sort'] ==
> $column['field']){
>                 echo $paginator->sort($column['title'],
> $column['field'],array('class'=>$paginator->sortDir()));
>               }
>              else{
>                echo $paginator->sort($column['title'],
> $column['field']);
>               }
>             }
>             else{
>               echo $paginator->sort($column['title'],
> $column['field']);
>             }
>           ?>
>         </th>
>         <?php endforeach; ?>
>   <?php else: ?>
>     <?php foreach($columns as $column): ?>
>       <th><?php echo $column['title'];?></th>
>     <?php endforeach; ?>
>   <?php endif; ?>
>   <th class="actions">Actions</th>
> </tr>
>
> <tr>
>   <?php //echo $form->create(null, array('action'=>'/index')); ?>
>   <?php echo $ajax->form('/
> index','post',array('update'=>'centerColumn','indicator' =>
> 'loading')); ?>
>     <?php foreach($columns as $column): ?>
>       <td style="text-align:center;margin:0;padding:0;width:auto;">
>          <?php echo 
> $form->input($column['field'],array('div'=>false,'label'=>''));?>
>
>       </td>
>     <?php endforeach; ?>
>     <td class="actions">
>       <?php echo 
> $form->end(array('label'=>'filter','id'=>'filter_submit','style'=>'display:none;'));?
>
>     </td>
> </tr>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to