make search submit button

how to make elgg search submit button

Thanks

  • Use the mod/search/views/default/search/search_box.php view to add a search input field including the submit button wherever needed. If you don't want to use this view you can at least see in the code how to implement a search box on your own.

  • thanks @iionly

    i try to add button...not working for me...

    Example for me....

    Thanks

  • echo elgg_view('search/search_box', array('class' => 'elgg-search-header'));

    Add this to your view code. This is how the search input field is added to the header section by Elgg core. If you want some other look you might want to provide your own css class instead of elgg-search-header.

  • @iionly

    thanks buddy.....

    if you will created plugin for me...it very helpful...

    Thanks

  • There is already a search plugin existing. It comes bundled with Elgg and adds a search box to the header on every page of your site. Of course, you have to enable it. The addition of the search input field with the elgg_view() line I suggested above also works only with the search plugin enabled.

    If you don't see the search box, then your theme plugin might be responsible (i.e. not included the search box). If you want the search to show up elsewhere it is a very specific requirement and no general search plugin will help you there. In this case the search box would have to be added by extending the corresponding view with a view that adds the search box with the elgg_view('search/box') call. A more general search plugin won't help you here.