基本上我正在显示一个模板,展示从数据库中读取的一些数据。允许用户检查表行,然后单击“删除”以从数据库中删除这些行。为了做到这一点,我在桌子周围写了一个自定义表格。这个表格有效吗?我错过了什么吗?我只是问,因为我有点自己这样做,我不确定我是否犯了任何错误。
由于
<form action="{{ path('main_referral_capture_manage_physicians') }}" method="post">
<table>
<thead>
<tr>
<th width="20">Select</th>
<th width="200">Referring Physician</th>
<th width="150">NPI Number</th>
<th width="150">Practice</th>
<th width="150">Location</th>
<th width="150">Phone</th>
<th width="150">Fax</th>
<th width="150">Email Address</th>
</tr>
</thead>
<tbody>
{% for physician in physicians %}
<tr>
<td><input name="chkphysician[]" type="checkbox" value="{{physician.id}}" /></td>
<td>{{ physician.physicianFirstName }} {{ physician.physicianLastName }}</td>
<td>{{ physician.physicianNpi }}</td>
<td>{{ physician.physicianPracticeName }}</td>
<td>{{ physician.physicianLocationName }}</td>
<td>{{ physician.physicianPhone }}</td>
<td>{{ physician.physicianFax }}</td>
<td>{{ physician.physicianEmail }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<input type="submit" value="Remove" />
</form>
答案 0 :(得分:2)
我认为你的树枝形状没有固有的问题。要验证您的树枝形式,您可以运行lint命令:
php app/console twig:lint @SomeBundleName