function renderActive($renderer = null, $vars = null, $action = '', $method = 'get', $enctype = null, $focus = true)
{
if (is_null($renderer)) {
$renderer = $this->getRenderer();
}
if (is_null($vars)) {
$vars = $this->_vars;
}
if (is_null($enctype) && !is_null($this->_enctype)) {
$enctype = $this->_enctype;
}
$renderer->open($action, $method, $this->getName(), $enctype);
$renderer->listFormVars($this);
if (!empty($this->_name)) {
$this->_preserveVarByPost('formname', $this->_name);
}
if ($this->_useFormToken) {
$token = Horde_Token::generateId($this->_name);
$GLOBALS['session']->set('horde', 'form_secrets/' . $token, true);
$this->_preserveVarByPost($this->_name . '_formToken', $token);
}
if (count($this->_sections)) {
$this->_preserveVarByPost('__formOpenSection', $this->getOpenSection());
}
/* Loop through vars and check for any special cases to
* preserve. */
$variables = $this->getVariables();
foreach ($variables as $var) {
/* Preserve value if change has to be tracked. */
if ($var->getOption('trackchange')) {
$varname = $var->getVarName();
$this->preserveVarByPost($vars, $varname, '__old_' . $varname);
}
}
foreach ($this->_hiddenVariables as $var) {
$this->preserveVarByPost($vars, $var->getVarName());
}
$renderer->beginActive($this->getTitle(), $this->getExtra());
$renderer->renderFormActive($this, $vars);
$renderer->submit($this->_submit, $this->_reset);
$renderer->end();
$renderer->close($focus);
}