I'm trying to run the Zend JQuery autocomplete function when I noticed this section in the Zend documentation .
The following user interface widgets are available as form view helpers. Make sure you are using the correct version of the jQuery UI library to be able to use them. Google CDN only offers the jQuery user interface up to version 1.5.2. Some other components are only available from jQuery UI SVN, as they were removed from the announced version 1.6 .
autoComplete ($ id, $ value, $ params, $ attribs): The AutoComplete View helper will be included in a future version of the jQuery user interface (currently only via jQuery SVN) and creates a text field and registers it to automatically complete the functionality. The completion data source must be set to "url" or "data" associated with jQuery, as described in the jQuery user guide.
Does anyone know which svn url tag or branch I need to download to get a javascript file with autocomplete functions available in it?
At the moment, my Bootstrap.php has
$view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$view->jQuery()->enable();
$view->jQuery()->uiEnable();
Zend_Controller_Action_HelperBroker::addHelper(
new ZendX_JQuery_Controller_Action_Helper_AutoComplete()
);
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
In my layout, I define the version of jquery ui that I want
<?php echo $this->jQuery()
->setUiVersion('1.7.2');?>
Finally, my index.phtml has an autocomplete widget
<p><?php $data = array('New York', 'Tokyo', 'Berlin', 'London', 'Sydney', 'Bern', 'Boston', 'Baltimore'); ?>
<?php echo $this->autocomplete("ac1", "", array('data' => $data));?></p>
I am using Zend 1.8.3 atm.