Parliament Hill Computers LtdParliament Hill Computers Ltd

Pear, Quickform & Smarty templates demonstration and example

Quick overview

Please look here for a quick overview of QuickForm2 & Smarty templates.


These pages are intended as a quick demo of QuickForm2 & Smarty templates, to convince you that is it worth your time to learn more about them.
The QuickForm2 documentation is sparse.


DemonstrationSmarty templatePhp code
Simple QuickForm2
QuickForm2 with data validation
QuickForm2 with SmartyQfSmarty.tplQf2Smarty.php


This is a rewrite of QuickForm, it needs PHP 5.2 or later.

To see one of every input field that QuickForm2 handles see Qf2ValidTypes.php & the same done with smarty Qf2ValidTypesSm.php with the templates Qf2ValidTypes.tpl and Qf2ValidTypesByElement.tpl. These should be regarded work in progress.

You may also find the stylesheets Qf2Style.css & Qf2StyleSm.css useful.

License and copyright

All description & sample files copyright (c) 2005, 2009, 2011, 2013, 2023 Parliament Hill Computers. Author: Alain D D Williams.

You may used these files as the basis your own (or organisation's/company's) project(s) (under whatever licence that you see fit). You may not claim ownership or copyright of any substantially unmodified files. Acknowledgement would be appreciated, but is not necessary.

These demonstrations are made available in the hope that they are useful. There may be errors: there is no warranty at all, use at your own risk.

Return to tutorial home.

If you want any help using the above, or have any comments or suggestions, please contact us.