Start a new topic

Multiple forms

Hi. I'm installing this on a Magento site and am wondering if I can setup multiple forms in the same page. I tried to replace 

Searchanise.SearchInput = '#search';


Searchanise.SearchInput = '.search-form input';

and many other combinations, but doesn't seem to work. This is to be able to make both the stily search box and the regular one work with the service. Anyone know how to do this?

Thanks and regards.

Dear Maxi,

In order to implement your request, please open the /app/code/community/Simtech/Searchanise/Block/Jsinit.php file and find the following line of code:

Searchanise.SearchInput = '#{$inputId}';

Here, you can specify any jQuery selector, for example:

Searchanise.SearchInput = '.search-input';

Thank you.


Thanks for your reply Arina. That's precicely what I did, with no luck. No matter what I put there, it would always work on the default #search input. Any idea what might be off? Regards.

Dear Maxi,

The easiest way is to add the same class for your input field and Searchanise one, for example you can add the search class into a search box like that:

<input id="search" type="text" name="q" value="" class="input-text snize-input-style search" autocomplete="off" placeholder="Search">

After that change this line of code:

Searchanise.SearchInput = '#search';

with this one:

Searchanise.SearchInput = '.search';

in the template code. Then open the System > Cache Management page in the admin panel of your store and click the Flush Cache Storage button.

Hope this will help you.

Thank you. 

Login or Signup to post a comment