$form = new HTML_QuickForm('frmTest', 'get');
$form->addElement('header', 'hdrTesting', 'Testing Smarty');
$form->addElement('text', 'txtFirstName', 'First name?');
$form->addElement('text', 'txtLastName', 'Last name?');
$form->addElement('text', 'txtAge', 'Age?');
$form->addElement('text', 'txtTelephone', 'Telephone number?');
$form->addElement('reset', 'btnClear', 'Clear');
$form->addElement('submit', 'btnSubmit', 'Submit');
if ($form->validate()) {
# If the form validates then freeze the data
$form->freeze();
}
// build the HTML for the form
$form->accept($renderer);
$form->display();