Ok I've actually got this working by using the code below.

My autocomplete action

public function groomappointserviceAction()
{

    $this->_helper->layout->disableLayout();
    $this->getHelper('viewRenderer')->setNoRender(true);

   // get a list of all grooming services IDs and related procedures
   $gqry= Doctrine_Query::create()
       ->select('g.groomServicesID, p.groomprocedure AS name')
       ->from('PetManager_Model_Groomservices g')
      ->leftJoin('g.PetManager_Model_Groomprocedures');
   $result = $gqry->fetchArray();

  //generate and return JSON string 
  $data = new Zend_Dojo_Data('groomServicesID',$result);
  echo $data->toJson();
}



The FilteringSelect on my form

  // Create a autocomplete select input for the grooming
    $gservice = new Zend_Dojo_Form_Element_FilteringSelect('gapmtService');
    $gservice->setLabel('Proceedure');
    $gservice->setOptions(array(
      'autocomplete' => true,
      'storeID'   => 'groomappointserviceStore',
      'storeType' => 'dojo.data.ItemFileReadStore',
      'storeParams' => array('url' =>
"/groomappointments/appointment/groomappointservice"),
      'dijitParams' => array('searchAttr' => 'name')))
        ->setRequired(true)
        ->addValidator('NotEmpty', true)
        ->addFilter('HTMLEntities')            
        ->addFilter('StringToLower')        
        ->addFilter('StringTrim');

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Help-needed-creating-filteringselect-from-joined-tables-tp3470508p3527349.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to