我有一个快速的问题
我可以在一个表单上拥有多少个 dojo 过滤选择?
我有一个带有 2 个过滤选择的表单,它们都从不同的 json 数据存储中获取数据以填充值。
然而,只有第一个过滤选择被填充,另一个没有数据。
我正在使用 Zend Framework 和 Zend_Dojo_Form 为此创建表单元素。
非常感谢。
好的,看起来我的代码在某个地方被破坏了。我的表单中失败的元素是:
$location = new Zend_Dojo_Form_Element_FilteringSelect('location');
$location->setAutocomplete(true)
->setStoreId('countiesstore')
->setStoreType('dojo.data.ItemFileReadStore')
->setStoreParams(array('url' => $baseUrl.'/dojo/counties'))
->setAttrib('searchAttr', 'title')
->setRequired(true)
->removeDecorator('DtDdWrapper')
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('Error');
当我访问http://localhost/dojo/counties时,我会读取 json 文件,但该元素没有填充任何数据。
有任何想法吗?