2014-02-21 42 views
0

我有一個錯誤在Symfony的1.4的應用程序,在一個頁面,一個簡單的表單:sfWidgetFormDoctrineChoice形式:無法取消

$this->widgetSchema['list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'Object', 'expanded' => true)); 

此代碼顯示覆選框的列表。 數據已成功從數據庫加載。 在表單上,​​我可以檢查每個選項並驗證我的表單。 但不可能取消的選項已經是「檢查」

<ul class="list"> 
    <li> 
    <input name="sf_guard_user_profile[list][]" type="checkbox" value="1" id="sf_guard_user_profile_list_1" /> 
    <label for="sf_guard_user_profile_list_1">Option 1</label> 
    </li> 
    <li> 
    <span class="checked"> 
     <input name="sf_guard_user_profile[list][]" type="checkbox" value="2" id="sf_guard_user_profile_list_2" checked="checked" /> 
     <label for="sf_guard_user_profile_list_2">Option 2</label> 
    </span> 
    </li> 
</ul> 

沒有任何人有一個想法?

+0

這看起來沒有symfony/doctrine相關,但更多的是html或javascript錯誤。你能在頁面上發佈所有的JS嗎?另外,這是正常的你的第一個複選框ID不匹配第二個? – sinhix

回答

0

我解決了我的問題。 這是一個jQueryUI插件的衝突。我只是不得不禁用它。

Thx無論如何都需要幫助。