I am trying to get started with PEAR's HTML_QuickForm but I'm having a problem. For some reason all of my form data is being submitted with GET and not POST. The default is supposed to be POST and I've tried setting it explicitly. The only thing I've been able to figure out is that when I simply call display() on the form it works correctly. I'm using a static template and for some reason when I use that it doesn't work correctly. My code is presented below.
<?php
include_once 'HTML/QuickForm.php';
include_once 'HTML/Template/Sigma.php';
include_once 'HTML/QuickForm/Renderer/ITStatic.php';
$form = new HTML_QuickForm('formtest', 'post');
$form->addElement('text', 'mytext');
$form->addRule('mytext', 'This is required', 'required');
$form->addElement('submit', 'mysubmit', 'This is a submit button');
$tpl = & new HTML_Template_Sigma('.');
$tpl->loadTemplateFile('template.html');
$renderer = & new HTML_QuickForm_Renderer_ITStatic($tpl);
$renderer->setRequiredTemplate('{label}<font color="red" size="1">*</font>');
$renderer->setErrorTemplate('<font color="red">{error}</font><br />{html}');
$form->accept($renderer);
$tpl->show();
?>