Doctrine orm sfWidgetFormDoctrineChoice表单:can';不要取消选中
我在Symfony 1.4中的一个应用程序中遇到了一个bug,该应用程序在一个页面中有一个简单的表单:Doctrine orm sfWidgetFormDoctrineChoice表单:can';不要取消选中,doctrine-orm,symfony1,symfony-1.4,Doctrine Orm,Symfony1,Symfony 1.4,我在Symfony 1.4中的一个应用程序中遇到了一个bug,该应用程序在一个页面中有一个简单的表单: $this->widgetSchema['list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'Object', 'expanded' => true)); 此代码显示复选框列表。 已成功从数据库加载数据。 在表单上,我可以检查每个选项并验证我的表单。 但无法取消选中
$this->widgetSchema['list'] = new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'Object', 'expanded' => true));
此代码显示复选框列表。
已成功从数据库加载数据。
在表单上,我可以检查每个选项并验证我的表单。
但无法取消选中已“选中”的选项。
-
选择1
-
选择2
有人有想法吗?我解决了我的问题。
这与一些jQueryUI插件有冲突。我只是不得不禁用它
无论如何,Thx需要帮助。这看起来与symfony/doctor无关,但更多的是一个html或javascript错误。你能在页面上发布所有的JS吗?另外,第一个复选框id与第二个复选框id不匹配是否正常?
<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>