Is it possible to turn off autocomplete or popular search terms? We have a few of these show up when you put in certain keywords and it just looks ugly.

enter image description here

1 Answer 1


I think there are multiple ways to do this. Override form.mini.phtml file and place it under Magento_Search/templates/form.mini.phtml in your current theme. file will contain below code.

 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.

// @codingStandardsIgnoreFile
/** @var $block \Magento\Framework\View\Element\Template */
/** @var $helper \Magento\Search\Helper\Data */
$helper = $this->helper(\Magento\Search\Helper\Data::class);
<div class="block block-search">
    <div class="block block-title"><strong><?= /* @escapeNotVerified */ __('Search') ?></strong></div>
    <div class="block block-content">
        <form class="form minisearch" id="search_mini_form" action="<?= /* @escapeNotVerified */ $helper->getResultUrl() ?>" method="get">
            <div class="field search">
                <label class="label" for="search" data-role="minisearch-label">
                    <span><?= /* @escapeNotVerified */ __('Search') ?></span>
                <div class="control">
                    <input id="search"
                           name="<?= /* @escapeNotVerified */ $helper->getQueryParamName() ?>"
                           value="<?= /* @escapeNotVerified */ $helper->getEscapedQueryText() ?>"
                           placeholder="<?= /* @escapeNotVerified */ __('Search entire store here...') ?>"
                           maxlength="<?= /* @escapeNotVerified */ $helper->getMaxQueryLength() ?>"
                    <div id="search_autocomplete" class="search-autocomplete"></div>
                    <?= $block->getChildHtml() ?>
            <div class="actions">
                <button type="submit"
                        title="<?= $block->escapeHtml(__('Search')) ?>"
                        class="action search">
                    <span><?= /* @escapeNotVerified */ __('Search') ?></span>

I just removed ajax call. you can remove div element

<div id="search_autocomplete" class="search-autocomplete"></div>

But I think in this case you need to remove "destinationSelector":"#search_autocomplete" as well. You can remove data-mage-it attribute as well. which will completely disabled suggestions.

Let me know if any other help needed from my end.

  • Welcone @cz84. Can you please upvote as well. Nov 8, 2018 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.