⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Search field doesn't show



zedofzardoz
  • profile picture
  • Member

Posted 01 February 2013 - 18:16 PM

Using version 1.3.3
using default set_theme

The field where you can search the table with does not show in the top right as it does in this example.
http://www.grocerycr.../set_a_relation

here is the function from my controller

function customers()
{
$crud = new grocery_CRUD();
$crud->set_table('customers');
$output = $crud->render();

$page = 'customers';
$data['title'] = ucfirst($page); // Capitalize the first letter
$this->load->view('templates/header', $data);
$this->_example_output($output);
$this->load->view('templates/footer', $data);
}


Thanks!

victor
  • profile picture
  • Member

Posted 01 February 2013 - 20:42 PM

Hi zedofzardoz and welcome to the forum!
there is a method called "set_theme".
You can have a look at all function here: http://www.grocerycrud.com/documentation/options_functions

zedofzardoz
  • profile picture
  • Member

Posted 02 February 2013 - 12:57 PM

Thank you for responding. The set_theme is a great tip that I have recently implemented. The datatables are great but were prone to the same lack of Search on the top right and dysfunctionality.

In the footer of my site was a line of code that I believe I put there for Twitter Bootstrap.
This is my footer.php...

<div class="well">
<center><strong>&copy; 2013 Robot</strong></center>
</div>
<!--
This was de-activated on 2/1/13 for interfering with the search functionality of Grocery Crud
It is part of the basic boot strap footer I think
<script src="http://code.jquery.com/jquery-latest.js"></script>
-->
<script src="<?php echo base_url(); ?>js/bootstrap.min.js"></script>
</body>
</html>

When I comment it out Grocery Crud works beautifully and my Twitter Bootstrap elements do also. My Bootstrap elements are a basic navbar and auto highlighting text field. I imagine if I do something more advanced I'd see an error.

Perhaps now I need to read up somewhere on compatibility between the two frameworks. All comments are appreciated. Thanks!