- Extended form() to take an optional forth parameter which is appended to
the <FORM> tag. - Added form_file($name) for file uploads. (requires form() to be called with $options='ENCRYPT="multipart/form-data"'.)3-00
parent
6f02738cc2
commit
30c236f22b
|
@ -170,8 +170,8 @@ function format_text($text) {
|
|||
return preg_replace($src, $dst, $text);
|
||||
}
|
||||
|
||||
function form($action, $form, $method = "post") {
|
||||
return "<FORM ACTION=\"$action\" METHOD=\"$method\">\n$form</FORM>\n";
|
||||
function form($action, $form, $method = "post", $options="") {
|
||||
return "<FORM ACTION=\"$action\" METHOD=\"$method\"". (!empty($options) ? " $options" : "") .">\n$form</FORM>\n";
|
||||
}
|
||||
|
||||
function form_item($title, $value, $description = 0) {
|
||||
|
@ -195,6 +195,10 @@ function form_hidden($name, $value) {
|
|||
return "<INPUT TYPE=\"hidden\" NAME=\"edit[$name]\" VALUE=\"". check_textfield($value) ."\">\n";
|
||||
}
|
||||
|
||||
function form_file($name) {
|
||||
return "<INPUT TYPE=\"file\" NAME=\"edit[$name]\">\n";
|
||||
}
|
||||
|
||||
function form_submit($value) {
|
||||
return "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". check_textfield($value) ."\">\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue