Thursday, April 28, 2011

Calling an element based on row selection

Hi,

My idea is to have a list of database data listed in a table, one row
per member data details.
Each member has a link to open a popup (I am using a basic modal
jquery script). In this popup I would like to have a comment field to
add comments regarding the selected client.

I am not sure how to do that.
How can I call the popup with the comment field, which is outsourced
in a element, and parse the member id to it?

Guess I have a table like
...
<td>memberid 1</td><td>echo $this->Html->link(__('leave a comment',
true),?></td>
</tr><tr>
<td>memberid 2</td><td>echo $this->Html->link(__('leave a comment',
true),?></td>
</tr><tr>
<td>memberid 3</td><td>echo $this->Html->link(__('leave a comment',
true),?></td>

My element looks like
<div id="popup">
<?php echo $this->Ajax->Form('comment', 'post', array('url' =>
array('action' => 'comment'))); ?>
<input type="hidden" id="memberID" value="????">
...
<td><textarea cols="10" rows="5" name="comment"></textarea></td>
....
<?php echo $this->Ajax->Form->end(); ?>
</div>

Please give me a hand with this, I am sure it must be possible
somehow....? Or?

Thanks!!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: