This uses a filter template to reformat the search form vertically. The phpLens search
form is very flexible. Try the following:
- Search for all product id's greater than 30: >30
- All product id's between 10 to 30: 10 (to) 30
- All product names beginning with V: V
ProductID
ProductName
Supplier
Category
Qty/Unit
1
coffee Exotic Liquids Beverages 10 boxes x 20 bags
2
Changie Grandma Kelly's Home Beverages 24 - 12 oz bottles
3
Super Fish Sauce Exotic Liquids Condiments 12 - 550 ml bottles
4
Chef Anton's Cajun Seasoning New Orleans Cajun De Condiments 48 - 6 oz jars
5
Chef Anton's Gumbo Mix New Orleans Cajun De Condiments 36 boxes
6
Grandma's Boysenberry Spread Grandma Kelly's Home 0 12 - 8 oz jars
7
Uncle Bob's Organic Dried Pears Grandma Kelly's Home Produce 12 - 1 lb pkgs.
8
Northwoods Cranberry Sauce Grandma Kelly's Home Condiments 12 - 12 oz jars
9
Mishi Kobe Niku Tokyo Traders Meat/Poultry 18 - 500 g pkgs.
10
Ikuraa Tokyo Traders Seafood 12 - 200 ml jars
11
Queso Cabrales Cooperativa de Queso Dairy Products 1 kg pkg.
12
Queso Manchego La Pastora Cooperativa de Queso Dairy Products 10 - 500 g pkgs.
13
Konbu Mayumi's Seafood 2 kg box
14
Tofu Mayumi's Produce 40 - 100 g pkgs.
15
Genen Shouyu Mayumi's Condiments 24 - 250 ml bottles
16
Pavlova Pavlova, Ltd. Confections 32 - 500 g boxes
17
Alice Muttons Pavlova, Ltd. Meat/Poultry 20 - 1 kg tins
18
Carnarvon Tigers Pavlova, Ltd. Seafood 16 kg pkg.
19
Teatime Chocolate Biscuits Specialty Biscuits, Confections 10 boxes x 12 pieces
20
Sir Rodney's Marmalade Specialty Biscuits, Confections 30 gift boxes
21
Sir Rodney's Scones Specialty Biscuits, Confections 24 pkgs. x 4 pieces
22
Gustaf's Knäckebröd PB Knäckebröd AB Grains/Cereals 24 - 500 g pkgs.
23
Tunnbröd PB Knäckebröd AB Grains/Cereals 12 - 250 g pkgs.
24
Guaraná Fantástica Refrescos Americanas Beverages 12 - 355 ml cans
25
NuNuCa Nuß-Nougat-Creme Heli Süßwaren GmbH & Confections 20 - 450 g glasses
26
Gumbär Gummibärchen Heli Süßwaren GmbH & Confections 100 - 250 g bags
27
Schoggi Schokolade Heli Süßwaren GmbH & Confections 100 - 100 g pieces
28
Rössle Sauerkraut Plutzer Lebensmittel Produce 25 - 825 g cans
29
Thüringer Rostbratwurst Plutzer Lebensmittel Meat/Poultry 50 bags x 30 sausgs.
30
Nord-Ost Matjeshering Nord-Ost-Fisch Hande Seafood 10 - 200 g glasses
31
Gorgonzola Telino Formaggi Fortini s.r Dairy Products 12 - 100 g pkgs
32
Mascarpone Fabioli Formaggi Fortini s.r Dairy Products 24 - 200 g pkgs.
33
Geitost Norske Meierier Dairy Products 500 g
34
Sasquatch Ale Bigfoot Breweries Beverages 24 - 12 oz bottles
35
Steeleye Stout Bigfoot Breweries Beverages 24 - 12 oz bottles
36
Inlagd Sill Svensk Sjöföda AB Seafood 24 - 250 g jars
37
Gravad lax Svensk Sjöföda AB Seafood 12 - 500 g pkgs.
38
Côte de Blaye Aux joyeux ecclésias Beverages 12 - 75 cl bottles
39
Chartreuse verte Aux joyeux ecclésias Beverages 750 cc per bottle
40
Boston Crab Meat New England Seafood Seafood 24 - 4 oz tins
41
Jack's New England Clam Chowder New England Seafood Seafood 12 - 12 oz cans
42
Singaporean Hokkien Fried Mee Leka Trading Grains/Cereals 32 - 1 kg pkgs.
43
Ipoh Coffee Leka Trading Beverages 16 - 500 g tins
44
Gula Malacca Leka Trading Condiments 20 - 2 kg bags
45
Røgede sild Lyngbysild Seafood 1k pkg.
46
Spegesild Lyngbysild Seafood 4 - 450 g glasses
47
Zaanse koeken Zaanse Snoepfabriek Confections 10 - 4 oz boxes
48
Chocolade Zaanse Snoepfabriek Confections 10 pkgs.
49
Maxilaku Karkki Oy Confections 24 - 50 g pkgs.
50
Valkoinen suklaa Karkki Oy Confections 12 - 100 g bars
Notes
This example demonstrates using a template to change the search screen:
$lens->templateFilter = 'ex311.tpl';
The contents of the template:
{$_FORMBEGIN_ }
<table width="100%" border="1">
<tr bgcolor="#333333">
<td colspan=5 align=right><font color="#FFFFFF"> {$_SUBMIT_ }</font> {$_DYNEDIT_ } </td>
</tr>
<tr bgcolor="#666666">
<td><b><font color="#FFFFFF">{$PRODUCTID_T }</font></b></td>
<td><b><font color="#FFFFFF">{$PRODUCTNAME_T } </font></b></td>
<td><b><font color="#FFFFFF">{$SUPPLIERID_T }</font></b></td>
<td><b><font color="#FFFFFF">{$CATEGORYID_T }</font></b></td>
<td><b><font color="#FFFFFF">{$QUANTITYPERUNIT_T }</font></b></td>
</tr>
<tr>
<td>{$PRODUCTID }</td>
<td>{$PRODUCTNAME }</td>
<td>{$SUPPLIERID }</td>
<td>{$CATEGORYID }</td>
<td>{$QUANTITYPERUNIT }
</td>
</tr>
</table>
{$_FORMEND_ }
The template consists of the fields ,eg {$PRODUCTID}, and the captions {$PRODUCTID_T}. And we also
have the buttons {$_SUBMIT_} and {$_CANCEL_}, though the cancel button has been removed. The
{$_DYNEDIT_} tag holds the green "e" editor button.
Finally we have the form management tags {$_FORMBEGIN_} and {$_FORMEND_}.
Other features include exporting to Excel [which requires the ob_start() call at the beginning of the page)] and setting the firstState to FILTERVIEW, so the search screen appears on startup.
$lens->exportLens = 'PRODUCTID;PRODUCTNAME;SUPPLIERID;CATEGORYID;QUANTITYPERUNIT';
$lens->firstState = 'FILTERVIEW';