diff options
Diffstat (limited to 'h-source/Library/Html')
-rw-r--r-- | h-source/Library/Html/Form.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/h-source/Library/Html/Form.php b/h-source/Library/Html/Form.php index e3148cd..501e2a2 100644 --- a/h-source/Library/Html/Form.php +++ b/h-source/Library/Html/Form.php @@ -89,6 +89,19 @@ class Html_Form { return $returnString; } + //return the HTML of an <input type='file' ...> + //$name: the name of the input + //$className: the class name of the input + //$idName: name of the id + static public function fileUpload($name, $value, $className = null, $idName = null) + { + $strClass = isset($className) ? "class='".$className."'" : null; + $idStr = isset($idName) ? "id='".$idName."'" : null; + + $returnString ="<input ".$idStr." $strClass type='file' name='" .$name. "'>\n"; + return $returnString; + } + //return the HTML of a checkBox //$name: name of the checkBox (string) //$value: the value of the checkBox (string or number) |