SearchForms v0.6.5 7/17/00 - Initial public release 7/21/00 - Reorganization for version 0.6.5, added phpdoc demo SearchForms is a modular system for creating HTML forms that can generate an arbitrary SQL statement. It depends on the SQL Abstraction Layer from the Enzyme open-source project, as well as the OOHFORMS library from PHPLIB. Using the objects provided by SearchForms, you can quickly and easily create a dynamic user interface for searching a database. SearchForms is part of the Enzyme open-source project, and is released under the terms of the GPL. For more information see: http://enzyme.sourceforge.net Both external libraries are in the include/ directory, but this is only a temporary condition. The OOHFORMS component is a slightly modified version of the one that ships with PHPLIB 6.4. The SAL component is a slightly modified version of SAL 0.5.2. The main-demo/ files are from the Catalyst Recruiting site, for which SearchForms was originally deveoped. To view the demo, point a web browser at the file main-demo/query2.php3. This file will show a search form, which, when submitted, will generate fairly complex SQL statements. Each o f the UI widgets in this demo represent a standard class in SearchForms. Each of the menus at the top of the form are called "filters" - each choice names a single complete SQL statement which limits the search result set. The menus in the "Show me" row are three in kind. One is a filter which selects a SQL statement. Each statement is linked to a text-based input box, and another menu which chooses an operation (=, >, <, like). Further, below each filter is a "suggest" box which contains a list of values which are valid input for the currently-selected item. This data is extracted from the database via a cron job that runs the file special_menu.php3 and generates the Javascript file special_menu.js (in session/). The last row shows a SearchForms "sort" object, which picks a SQL statement to order the data set. The rest of the widgets are standard OOHFORMS types. The SQL queries that are linked to these various widgets are built using the SAL in setup_queries.inc and filter_queries.inc. The code to generate the search form itself is in special_query.inc which takes its HTML layout from form_layout.ihtml and search_row.ihtml. sqlforms.inc contains the SearchForms-specific extensions to the OOHFORMS library, which is contained in include/ For more information on this library, see the PHPLIB documentation at http://phplib.netuse.de The images in the images/ directories are owned by Catalyst Recruiting and may not be used without permission. They are included here strictly for the purposes of the demo. special_query.inc is derived from the PHPLIB class Sql_Query and attempts to adopt a similar syntax. Some functionality for the demo requires being connected to a real live database with PHPLIB's session management installed. These features include the ability to move "next" and "prev" through a result set, and the ability to dynamically increase and decrease the number of search rows in the search form. To enable these features, simply uncomment the relevant code in query2.php3 and connect this to a proper database. You may get a useful schema from the Enzyme or EnzymeTemplates package from the Enzyme home page. Or, you may edit the relevant queries in setup_queries.inc and/or filter_queries.inc to match your own schema.