I'm wanting that in modal, after clicking on the option view, it loads the information. However, it only loads ID 1 from the table, regardless of which table item I want to display. It always brings the same information. Below is the code for how I'm doing.
<div class="container-fluid">
<table class="table table-striped" data-toggle="table"
data-search="true"
data-show-refresh="true"
data-show-columns="true">
<thead>
<tr>
<th class="th-small" data-align="left" data-sortable="true">ID</th>
<th data-align="left" data-sortable="true">Nome</th>
<th class="th-small">Ações</th>
</tr>
</thead>
<tbody>
<?php
foreach ($idade as $key => $v) {
?>
<tr>
<td><?= $v->id ?></td>
<td><?= $v->titulo ?></td>
<td>
<form data-toggle="validator" method="POST" enctype="multipart/form-data">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="submit" data-toggle="dropdown">... <span class="caret"></span></button>
<ul class="table-modal dropdown-menu">
<li class=""><a data-toggle="modal" data-target="#modal-select">Visualizar</a></li>
<li><a data-toggle="modal" data-target="#editarIdade">Editar</a></li>
</ul>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<!-- Modal VISUALIZAR -->
<div class="modal fade" id="modal-select" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="cadastroIdadelLabel">Visualizar - Idade</h4>
</div>
<div class="modal-body">
<form class="form-inline" role="form" data-toggle="validator" action="Idade/page/visualizar">
<fieldset>
<div class="form-group">
<div>
<label>Idade:</label>
<?= $v->titulo ?>
</div>
<div>
<label>Código:</label>
<?= $v->id ?>
</div>
</div>
</fieldset>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Voltar</button>
</div>
</form>
</div>
</div>
</div>