Jump to content


Member Since 13 Aug 2019
Offline Last Active Dec 17 2019 01:12 PM

Topics I've Started

Submit on Search-Button/ Search with Enter

13 August 2019 - 09:57 AM

Since I used Grocery_Crud i always automatically try to start the search action with Enter, but nothing happened so i have to click with the mouse on the Search-Button. 


With a tiny modification in the list_template.php it could be changed. 

File: assets/grocery_crud/themes/flexigrid/views/list_template.php


Search for the "<div class="sDiv quickSearchBox" id='quickSearchBox'....."

Here you find nearby "<input type="button" value="<?php echo $this->l('list_search');?>" class="crud_search" id='crud_search'>"

change the <input type="button" to <input type="submit"


Now it ist easy to search in the lists by Enter :).






Disable Footer/Searchbox in List-View

13 August 2019 - 08:57 AM

In small grids sometimes it makes sense to disable the Information and the Search-option in the bottom of the ListView.


I manipulate the File assets/grocery_crud/themes/flexigrid/views/list_template.php an add in the div the style-option "display".



  <div class="sDiv quickSearchBox" id='quickSearchBox' style="display: <?php echo $_SESSION['gcm_searchbox']?>;">



  <div class="pDiv" style="display: <?php echo $_SESSION['gcm_footerpage']?>;">


Now you have to initialize the Variable in the _construct() function in your Main-Controller. 

  $this->session->gcm_searchbox = 'flexible';

  $this->session->gcm_footerpage = 'flexible';



If you want to disable the Searchbox or the Footerpage Section you only have to set the Session-Variable to disable before you render().


    $this->session->gcm_searchbox = 'none';

    $this->session->gcm_footerpage = 'none';


I hope this ist helpful :).