Search code examples
phpjoomlamodule

How to modify Joomla default search module?


I want to remove the label "Search" in Joomla search module (default search module). I have modified the default_form.php from the directory /joomla15/components/com_search/views/search/tmpl/ and even removed the following code but it makes no difference on the site:

<label for="search_searchword">
    <?php echo JText::_( 'Search Keyword' ); ?>:
</label>

Actually i am using an image button for the Search and I dont want the label to be displayed. What should I do to remove it?


Solution

  • I never used Joomla! so I just guess but maybe there's some kind of template cache? Try to clear it.

    But what you're trying to do is a very bad practice. This label makes your forms more available (for screen readers etc.). Don't try to remove this element - just hide it using CSS:

    #mySearchForm label {
        display: none;
    }