我使用Symfony 1.4和Bootstrap。我有一個問題格式化複選框列表。每個複選框的文本都會顯示關於其複選框的換行符。正確Symfony 1.4和Bootstrap。如何像Bootstrap一樣格式化複選框列表?
<li><input name="mensajes[receptores_list][]" type="checkbox" value="5" id="mensajes_receptores_list_5" /><label for="mensajes_receptores_list_5">Carlos (Admin)</label></li>
對於引導顯示每個複選框,我需要的Symfony生成下面的代碼:
Symfony的生成HTML代碼到每個複選框
<label class="checkbox">
<input name="mensajes[receptores_list][]" type="checkbox" value="5" id="mensajes_receptores_list_5" /> Carlos (Admin)
</label>
如何我能得到這個?
選項 '的setAttribute(' 類, '複選框')」不,因爲我需要工作。 Symfony放置該屬性,但不是每個複選框,因爲我需要。我試圖'sfWidgetFormSchemaFormatter',但都沒有達到預期的結果。 –