Hi ncy111,

Are you fetching the form with ajax? If so, stop doing it. I would
generate the list with all forms in cake (+ values) and hide the
form with "display:none" and just add Element.toggle(form-id) to
the edit Link. You save bandwidth this way and you can develope the
look/position right within your view.

Also putting a form into a table is bad and wont work / or is buggy on
some browsers.

This is bad:
<table><tr><td><form>

This is ok:
<table><form><tr><td>

But anyhow i dont suggest this. You mention in the second part of your
post that you want to have them in a list item. Thats okay, but i can
relate that with your previous table-statement..

As mentioned before i would just hide them instead of fetching them
over Ajax. Your view could look something like this:

<table id="list">
<?php foreach($items as $item): ?>

      <tr>
          <td><?php e($item['title']);?></td>
          <td><a href="javascript:;" onclick="Element.toggle('form<?php 
e($id);?>')">Edit</a></td>
      </tr>

<form id="form<?php e($id);?>" action="/whatever/edit" style="display:none">
      <tr>
          <td><?php e($html->input(Item/bla));?></td>
          <td><button type="submit">Save</button></td>
      </tr>
</form>

<?php endforeach; ?>
</table>

Hope this helps..

regards,
m3nt0r

in reply to message from Samstag, 30. September 2006 at 21:13:

> hi

> i'm trying to a produce an ajax->link() so that when a user clicks on
> it, a <form> in a <table> appears similar to what you see when you
> click  on 'edit' at http://del.icio.us. the <form> appears just fine
> when it's NOT in a <table>, but all i get is blank space when i do put
> the form in a <table>.

> btw, this form should appear as an item of a <ul> (also similar to
> del.icio.us). can anyone help? any suggestions would be greatly
> appreciated.

> thanks,
> nathan


> 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to