localgovdrupal / localgov_search

Default sitewide search implementation for LocalGov Drupal.
GNU General Public License v2.0
0 stars 1 forks source link

Search block: Placeholder & Button text #21

Open budda opened 2 years ago

budda commented 2 years ago

Currently, the search form submit button label says "Apply" which doesn't make sense.

Some councils use "GO" as the button text, others have simply got an icon for a button.

markconroy commented 2 years ago
budda commented 2 years ago

At the moment the placeholder text in the textfield says "Search" too -- maybe that should be "keyword" or "phrase" otherwise the UI looks like

Screenshot 2022-05-09 at 16 51 57
willguv commented 2 years ago

@markconroy how about "Search" as that's what the button does

markconroy commented 2 years ago

Looks like this is an issue for the Localgov Search module, not the base theme, as it's stored in config there: https://github.com/localgovdrupal/localgov_search/blob/1.x/config/install/views.view.localgov_sitewide_search.yml

markconroy commented 2 years ago

@finnlewis Do you know how to transfer an issue from one repo to another? If so, can you move this to LocalGov Search module please?

ekes commented 1 year ago
markconroy commented 1 year ago

 * Implements hook_form_alter().
 */
function lgd_form_alter(&$form, $form_state, $form_id) {
  dpm($form_id);
  dpm($form);
}```

Those `dpm`s return the form from the view, not the form from our custom code.  So you can't get at our custom code form to alter the placeholder, it will only alter the placeholder from the view version (on the /search page).