Search api autocomplete with commerce kickstart i am using search api with commerce kickstart i have created a view and used it as an exposed form on the homepage, I have used the search api autocomplete module but its not working because the server is not supported. So I have made a custom module to do the autocomplete feature for my search filter block. This is the code

&lt;?php

function ajaxforms_menu() {  
$items['ajaxforms/autocomplete'] = array(
'page callback' =&gt; 'ajaxforms_products',
'access arguments' =&gt; array('access ajax autocomplete'),
'type' =&gt; MENU_CALLBACK
);
return $items;
}


function ajaxforms_form_alter(&amp;$form, &amp;$form_state, $form_id) {
if ($form_id == 'views_exposed_form-display_products-page') {
$form['#submit'][] = 'ajaxforms_submit_funtion';
}
}
function ajaxforms_submit_function(&amp;$form, &amp;$form_state) {
$search_str = $form_state['values']['views-exposed-form-display-products-page'];
$form_state['rebuild'] = TRUE;
drupal_goto('path_to_your_search_view', array('query' =&gt; array('search_api_view_fulltext' =&gt; $search_str)));
}

function ajaxforms_products($string) {
$matches = array();

// DB table which holds products
$query = db_select('commerce_product', 'p');

// Select rows that match the string
$return = $query
-&gt;fields('p', array('title'))
-&gt;condition('p.title', '%' . db_like($string) . '%', 'LIKE')
-&gt;range(0, 10)
-&gt;execute();

// add matches to $matches
foreach ($return as $row) {
$matches[$row-&gt;title] = check_plain($row-&gt;title);
}

drupal_json_output($matches);
}


But its not working I dont know where I am wrong on this. Anyone have any idea on how to solve this ? I want the autocomplete in the block of the exposed filter search which I am using as a block
I got it working by using this example jQuery Autocomplete

If anyone else get stuck in this just ask me and I'll try to help out