Hi guys, I've got some form elements built using Dojo data stores, basically like this:
$this->addElement('FilteringSelect', 'client_id', array( 'label' => 'Client:', 'store' => 'clientStore', 'autoComplete' => 'false', 'hasDownArrow' => 'true', 'id' => 'client_id', )); with <div dojoType="ClientReadStore" jsId="clientStore" url="/clients/autocomplete/format/ajax" requestMethod="get"></div> on the form page. But when I call $form->populate in the edit controller, it is populating the value correctly (as confirmed by print_r($this->form->getValues()) in the edit view), but the select isn't displaying anything. I'm assuming this is happening because the options aren't being generated until after the first attempt to type something in to the select or click on the down arrow, so I've tried adding an extra default option to fill out the drop down while it's waiting for someone to click on something by going: $form->getElement('client_id')->addMultiOption($id, $value); in the controller, but it's no go. Doesn't work. The only other idea I've got is somehow triggering the form to fill the dropdown list with JS when it first loads, but I haven't found any documentation on such features, so I'm basically shooting in the dark with it. So has anyone else solved this issue? Or am I doing something wrong / missing the obvious?