function open(&$renderer, &$vars, $action, $method = 'get', $enctype = null)
{
if (is_null($enctype) && !is_null($this->_enctype)) {
$enctype = $this->_enctype;
}
$renderer->open($action, $method, $this->_name, $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);
}
/* 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());
}
}