Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By dafweb on
I have a problem in creating the search box template for my custom template (using Drupal 8).
Basically, the search box has the correct address in the "action" attribute of the "form" element (http://www.mydomain.com/my-site/en/search/site).
But when you click the search button the action url "becomes" wrong (http://www.mydomain.com/en/find/whatever).
<!--form--search-block-form.html.twig-->
<form{{ attributes.addClass('search-form', 'navbar-form navbar-search fnd') }} role="search">
<div class="input-group">
<input type="text" class="form-control input-sm q" placeholder="{{'Search'|t}}" name="q" id="q" title="{{'Search in the website'|t}}">
<span class="input-group-btn">
<button id="sbtn" class="btn btn-sm" type="submit" title="{{'Search in the website'|t}}"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
</span>
</div>
</form>
Do you have an idea about this problem?
Thank you in advance
Comments
Does anyone have a suggestion
Does anyone have a suggestion for this problem please?