how many dojo fliteringselect can I have on a form?

Posted by Grant Collins on Stack Overflow See other posts from Stack Overflow or by Grant Collins
Published on 2009-09-27T08:54:50Z Indexed on 2010/05/15 17:04 UTC
Read the original article Hit count: 167

Filed under:
|
|

I have a quick question

How many dojo filteringselects can I have on a form?

I have a form with 2 filteringselects on it, both getting data from different json datastores to populate the values.

However only the first filteringselect is being populated, the other grabs no data.

I am using Zend Framework and Zend_Dojo_Form to create the form elements for this.

Many thanks.


Ok looks like my code is broken somewhere then. The element that is failing in my form is:

$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');

When I go to http://localhost/dojo/counties I get the json file to read, but the element isn't populated with any data.

Any ideas?

© Stack Overflow or respective owner

Related posts about dojo

Related posts about zend-form