【发布时间】:2016-04-29 06:51:58
【问题描述】:
我的 Symfony 2 应用程序中有以下标记,它使用 from_widget 和 form_row 生成表单。
<tr class="ui-sortable-handle" data-order="45">
<form novalidate="" action="/administration/guide/9/row/45/update/" method="post"></form>
<td style="width: 15%;">
<select id="guide_row_channel" class=" form-control" name="guide_row[channel]">
<option value="">All</option>
<option value="1">Belleisle</option>
<option value="2">Dalmilling</option>
<option value="3">Seafield</option>
</select>
</td>
我的 Twig 模板是:
<tr data-order="{{ row.id }}">
<form method="post" action="{{ path('guide_row_update', { 'GuideId' : guide.id, 'id' : row.id }) }}" novalidate>
{{ form_widget(form.channel) }}
// ... some more form_widget and form_row in here ...
<td align="right" style="width: 110px;">
// ... button in here ...
</td>
</form>
</tr>
我遇到了一个问题,即表单字段在 Firefox 上无法选择,但在 Chrome 中却可以正常工作。
我是否有一些明显无效的 HTML,Chrome 可以放飞但 Firefox 没有?为什么表单会在标记中自动关闭?
【问题讨论】:
标签: html symfony firefox twig forms