Smarty Integrated with QuickForm

This is a great site that actually has a demo with 'copy and paste' examples (minor adjustments may be needed) that can provide an excellent working demo of how this works.
http://www.midnighthax.com/smarty-guide.php