ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Getting Started with PHP's HTML_QuickForm
Subject:   Pretty Cool, but...
Date:   2004-10-31 15:05:16
From:   superbenk
Response to: Pretty Cool, but...

It's not too hard. Once you instantiate Smarty before the form, you output the form using Pear's Smarty rendering interface. You simply replace the $form->display(); line with something like the following:


$renderer =& new HTML_QuickForm_Renderer_ArraySmarty($smarty);
$form->accept($renderer);
$smarty->assign('new', $renderer->toArray());
$smarty->display('formtemplate.tpl');