I have a form with (at least) the following two fields:
A club is a field that is created using the ZendX_JQuery_Form_Element_AutoComplete element , which also generates the following javascript code:
$("#club").autocomplete({"url":"\/mywebsite\/\/mycontroller\/autocomplete"});
I have a database of clubs around the country. I want only clubs to return (for a given country). This list should be retrieved using a remote (ajax) call. Code for this:
public function autocompleteAction()
{
$request = $this->getRequest();
$filter = $request->getParam('q');
$country = $request->getParam('country');
$clublist = getClubListBySubstring($country, $filter);
$this->_helper->autoComplete($clublist);
}
Perhaps I can change the above javascript code, bypassing the generation made by ZendX_JQuery_Form_Element_AutoComplete, and add an extra element to the URL, which is interpreted as a country parameter .
? - ExtraParams, ?