我有一个名为 index 的文件,其中显示了客户查询列表。我想在其中放置多个删除。
我的索引文件列表的代码如下。
{% block body -%}
<h1>Enquiry list</h1>
<table class="records_list" id="rounded-corner">
<thead>
<tr>
<th>Option</th>
<th>Id</th>
<th>Name</th>
<th>Email</th>
<th>Subject</th>
<th>Body</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><input type="checkbox" name="multiSelect" id="multiSelect[]" value="{{ entity.id }}"></td>
<td><a href="{{ path('enquiry_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.name }}</td>
<td>{{ entity.email }}</td>
<td>{{ entity.subject }}</td>
<td>{{ entity.body }}</td>
<td>
<a href="{{ path('enquiry_show', { 'id': entity.id }) }}" title="View"><img src="http://test//bundles/blogger/image/view.png" style="width:30px; height:30px"></a>
<a href="{{ path('enquiry_edit', { 'id': entity.id }) }}" title="Edit"> <img src="http://test//bundles/blogger/image/edit.png" style="width:30px; height:30px" > </a>
</td>
</tr>
{% endfor %}
</tbody>
<tfooter>
</tfooter>
</table>
<ul>
<li>
<a href="{{ path('enquiry_new') }}">
Create a new entry
</a>
</li>
</ul>
{% endblock %}
我已经把复选框放在里面了。我想要的是存储所有id的“multiSelect []”的数组值。我正在将它传递给我的控制器。我不知道如何将此数组值作为我的控制器参数传递。所以请帮助我,我想在这里传递它。
<tfooter>
<a href="{{ path('enquiry_edit', " ") }}">MultiDelete</a>
</tfooter>