Using HTML_QuickForm To Manage Web Forms, Part 1 - Conclusion
(Page 13 of 13 )
Now for a quick round up of the points covered in the article today. I started with a goal to find a package - or a class - that would make my task of generating Web forms easy. After some painstaking research, I came across the HTML_QuickForm PEAR package.
The first example in this article demonstrated how you could create standard <FORM> element using the HTML_QuickForm() object and its addElement() method. The second example went on to explain the concept of a "grouping" of elements - these could either be from a logical perspective or simply because we want to display two <FORM> controls on the same line. Next, I showed you how to implement "server-side" as well as "client-side" validation by defining "rules" for the Web form. Finally, the concluding example showed you how to filter the data submitted by the user and insert it into a MySQL database using the process() method.
In the next part of this tutorial, I will examine some advanced custom HTML_QuickForm elements - these include auto-complete text-boxes, dependent <SELECT> drop down controls, checkboxes that always submit a value and much more. I will also show you how to upload a file to the server using a Web form generated by the HTML_QuickForm package. Finally, it will demonstrate how to use Smarty templates to drive the layout of your Web forms in conjunction with HTML_QuickForm.
Till then, stay healthy.
Note: All examples in this article have been tested on Linux/i586 with Apache 1.3.12, MySQL 3.23 and PHP 4.1.2. Examples are illustrative only, and are not meant for a production environment. YMMV!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |