[eluser]Punisher[/eluser]
I'm still learning about CI and about web development so this will not be a problem for you experienced devs.
I have a view which fetches data from controlers function in a foreach loop. So my data is populated in a table. I also have a hidden form which is shown on jquery function and I would like to use it as a edit form.
example: When user clicks on selected row form pops out and values within inputs are that of selected row. When there is only one selected row it is not a problem since there is only one id but hot to do this wih multiple data. My guess is that this is done by Javascript/jQuery.
Can someone write an example how to pass a selected row from in to another input. Thanks.
Example:
Code:
<?php foreach($user as $row){ ?>
<tr>
<td> <?php echo $row->something ; ? </td>
<td><a id="row_<?php echo $row->something_id?>" href="#">Edit</a></td>
</tr>
<?php } ?>
script
var a = ???
$(document).ready(function(){
$('row_a').click(function(){
//
});
});
end_script