Home » HTML » HTML_QuickForm » Bug #5166
empty <form tag
Details
| Submitted | 2005-08-21 09:47 UTC |
|---|---|
| From | michael at klink dot ws |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 5.0.5 |
| OS | win xp |
| Roadmaps | (Not assigned) |
Comments
[2005-08-21 09:47 UTC] michael at klink dot ws
Description:
------------
the <form {qf_attributes}> was not filled, it produced something like this...
<form >
Test script:
---------------
final public function _lost() {
$this -> _template -> replaceBlockfile("MAIN", FORM_TEMPLATE);
$this -> _template -> setCurrentBlock("MAIN");
$this -> _template -> setCurrentBlock("FORM");
$this -> _form = new HTML_QuickForm("form", "POST", "http://localhost/boehse-papaz/index.php", "_self", NULL, FALSE);
$this -> _form -> addElement("header", "LostData", "OSys - LostData");
$this -> _form -> addElement("hidden", "_class", "_access");
$this -> _form -> addElement("hidden", "_function", "_lost");
$this -> _form -> addElement("hidden", "_id", $this -> _id);
$this -> _form -> addElement("hidden", "_page", $this -> _page);
if($this -> _form -> validate()) {
$this -> _form -> addElement("static", "message", "test");
}
$this -> _form -> addElement("text", "username", "Username", "class=\"FormText\"");
$this -> _form -> addElement("submit", "submit", "submit", "class=\"FormButton\"");
$this -> _form -> setRequiredNote("* denotes requiered fields!");
if($this -> _form -> validate()) {
$this -> _form -> addElement("static", "password", "Password");
$this -> _form -> removeElement("submit");
$this -> _form -> setDefaults(
array(
message => $language[information301],
password => createPassword()
)
);
$this -> _form -> freeze();
$this -> _form -> process("process_data", false);
}
$this -> _renderer =& new HTML_QuickForm_Renderer_ITDynamic($this -> _template);
$this -> _form -> accept($this -> _renderer);
$this -> _template -> setVariable("{FORM}", $this -> _renderer);
$this -> _template -> parseCurrentBlock("FORM");
$this -> _template -> clearVariables();
$this -> _template -> parseCurrentBlock("MAIN");
$this -> _template -> clearVariables();
}
Expected result:
----------------
<form >