I'm using Search API Solr Search and can't seem to get a placeholder attribute in it. I've tried using hook form alter as I would on a normal search block, but doesn't seem to work with search api solr.
The id of the form = views-exposed-form-recipe-find-recipe-find-list
The name of the search input field = search_api_views_fulltext
I've placed this function in my theme's template.php...
function marigold_institute_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'views_exposed_form_recipe_find_recipe_find_list') {
$form['search_api_views_fulltext']['#attributes']['placeholder'] = t('Search by name or ingredient');
}
}
I'm not quite sure what I'm doing wrong. This is the first time I've tried using hook_form_alter, so I could easily be missing something obvious. I tried the function on a normal search block using "search_block_form" for the id and name, and it worked. I just can't seem to get it working with search api solr search.