Hot answers tagged

1

You can use hook_form_alter or hook_form_FORM_ID_alter to alter a form. Core's search block form has a form id of search_block_form, so you could implement with hook_form_FORM_ID_alter() like: use Drupal\Core\Form\FormStateInterface; function mymodule_form_search_block_form_alter(&$form, FormStateInterface $form_state) { $form['#action'] = '/my-custom-...


Only top voted, non community-wiki answers of a minimum length are eligible