Search button text not showing in a Bootstrap sub-theme I'm using a sub-theme of the Bootstrap v8.x-3.1 theme.

By default the search button shows the search icon.

In the theme settings you can un-check 'Iconize Buttons' which I expect would show the 'Search' text instead of the icon, however it shows an empty button... no text or icon.



How do I get the button to show 'Search' text instead of an icon?
The solution I found for this was to copy this file from the Bootstrap theme directory

src/Plugin/Form/SearchBlockForm.php

to the same location in your sub-theme.

Then you can set the icon_only property to FALSE.

e.g.

&lt;?php
/**
 * @file
 * Contains \Drupal\subtheme\Plugin\Form\SearchBlockForm.
 */

namespace Drupal\subtheme\Plugin\Form;

use Drupal\bootstrap\Annotation\BootstrapForm;
use Drupal\bootstrap\Plugin\Form\FormBase;
use Drupal\bootstrap\Utility\Element;
use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_form_FORM_ID_alter().
 *
 * @ingroup plugins_form
 *
 * @BootstrapForm("search_block_form")
 */
class SearchBlockForm extends FormBase {

  /**
   * {@inheritdoc}
   */
  public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
    $form-&gt;actions-&gt;submit-&gt;setProperty('icon_only', FALSE);
    $form-&gt;keys-&gt;setProperty('input_group_button', FALSE);
  }

}


I still think there must be an easier way... but until then.