php - Hide select in Drupal
one text
Solution:
you should try this hook:
function themename_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (in_array($form_id, ['views_exposed_form'])) {
if ($form['#id'] == "views-exposed-form-custom-search-page-1") { // your form id
// your filter logic and return filter form value like
// $form["langugae"]["#options"] = $options;
}
}
}
Source