The action value for the core search form is /search/node.
How could I get it to go instead to a different url for a custom View?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityif you don't want to do it with code you can use Custom Searchit gives you the possibility to configure it from configuration page:
For node search you can change it from admin/config/search/pages/manage/node_search
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-path';
}