How do I display the search term after I have run the search.

Here is my form:

<input data-drupal-selector="edit-search-api-fulltext" id="edit-search-api-fulltext"  placeholder="Keyword" name="search_api_fulltext" value="{{ content.search_api_fulltext }}" class="regular-input" type="text">
<input data-drupal-selector="edit-submit-search" id="edit-submit-search" placeholder="Search" value="Search" class="btn secondary-btn js-form-submit form-submit" type="submit">

The value is not displaying anything, but I can't find an answer to what I should place here. Before installing Search Api I used {{ content.search_query }} and that displayed the search term after the search was performed using the out-of-the-box Drupal search.

  • 1
    "Search" and "Search API" are different modules. You'd have to check and see what template variables are available to use.
    – Kevin
    May 13 at 14:52
  • Yes, I know. That's why I explained what worked for me using search as an example of what i'm trying to do and said that I can't get it to work with Search API. I can't find anything that tells me what template variables I can use.
    – MrFox
    May 13 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.