⚠ 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

Start grid with search/Filter box open



fdias

fdias
  • profile picture
  • Member

Posted 15 June 2012 - 01:32 AM

I replied this to another thread and I thought I would post it here as an extra code for a small feature in case someone else is interested.

If you wish to have the search/filter box open when you start the grid so the user won't have to click on the magnifier button, then all you need to do is have this code on the head section of your view:


<script type="text/javascript">
$(document).ready(function() {
$('#quickSearchButton').trigger('click');
});
</script>


I hope this helps someone else.

Cheers.

noskov.biz

noskov.biz
  • profile picture
  • Member

Posted 15 June 2012 - 06:41 AM

Hi! Thank you for sharing. In one of these days I thought about open search box and you are just in time. :)

waqar

waqar
  • profile picture
  • Member

Posted 11 September 2012 - 18:44 PM

Any ideas/thoughts on how to make the search filter for a scenario like:

Search Orders FROM DATE, TO DATE ?

HellKnight

HellKnight
  • profile picture
  • Member

Posted 21 September 2012 - 10:20 AM

[quote name='waqar' timestamp='1347389056' post='3364']
Any ideas/thoughts on how to make the search filter for a scenario like:

Search Orders FROM DATE, TO DATE ?
[/quote]

Has anyone found a solution to this problem?

victor

victor
  • profile picture
  • Member

Posted 22 September 2012 - 19:50 PM

[quote name='HellKnight' timestamp='1348222830' post='3565']
Has anyone found a solution to this problem?
[/quote]
use the method "where".

HellKnight

HellKnight
  • profile picture
  • Member

Posted 24 September 2012 - 06:41 AM

Ok

kanted

kanted
  • profile picture
  • Member

Posted 04 December 2015 - 05:22 AM

I have copied the above code in the header section of my grocery view php file. when i click search it find the records as usual. it does not open the edit page

please find the view header and please let me know where i am wrong

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php 
foreach($css_files as $file): ?>


<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
<script src="<?php echo $file; ?>"></script>
<script type="text/javascript">
    $(document).ready(function() {
    $('#quickSearchButton').trigger('click');
});
</script>


<?php endforeach; ?>
<style type='text/css'>
body
{
font-family: Arial;
font-size: 14px;
}
a {
    color: blue;
    text-decoration: none;
    font-size: 14px;
}
a:hover
{
text-decoration: underline;
}
</style>
</head>