Index: /trunk/plugins/Forms/forms.js
===================================================================
--- /trunk/plugins/Forms/forms.js (revision 191)
+++ /trunk/plugins/Forms/forms.js (revision 199)
@@ -82,4 +82,10 @@
 		this.value = value;
 	}
+  function setAttr(el, attr, value) {
+    if (value != "")
+      el.setAttribute(attr, value);
+    else
+      el.removeAttribute(attr);
+  }
   var outparam = new Object();
   var type = button_id;
@@ -100,9 +106,13 @@
       outparam.f_name = frm.name;
       outparam.f_action = frm.action;
-      outparam.f_method = frm.metho;
+      outparam.f_method = frm.method;
+      outparam.f_enctype = frm.enctype;
+      outparam.f_target = frm.target;
     } else {;
       outparam.f_name = "";
   	  outparam.f_action = "";
-	    outparam.f_method = "";  
+	    outparam.f_method = "";
+      outparam.f_enctype = "";
+      outparam.f_target = "";
     }
   	editor._popupDialog("plugin://Forms/form", function(param) {
@@ -110,11 +120,16 @@
 	  		if(frm) {
 			    frm.name	 = param["f_name"];
-				  frm.action = param["f_action"];
-				  frm.method = param["f_method"];
+          setAttr(frm, "action", param["f_action"]);
+          setAttr(frm, "method", param["f_method"]);
+          setAttr(frm, "enctype",param["f_enctype"]);
+          setAttr(frm, "target", param["f_target"]);
 		    } else {
-			    editor.surroundHTML('<form name="' + param["f_name"] + '"' +
-                                   ' action="' + param["f_action"] + '"' +
-			                             ' method="' + param["f_method"] + '">',
-                              '&nbsp;</form>');
+          frm = '<form name="' + param["f_name"] + '"';
+          if (param["f_action"] != "") frm += ' action="' + param["f_action"] + '"';
+				  if (param["f_method"] != "") frm += ' method="' + param["f_method"] + '"';
+          if (param["f_enctype"] != "") frm += ' enctype="' + param["f_enctype"] + '"';
+          if (param["f_target"] != "") frm += ' target="' + param["f_target"] + '"';
+          frm += '>';
+			    editor.surroundHTML(frm, '&nbsp;</form>');
         }
       }
Index: /trunk/plugins/Forms/popups/form.html
===================================================================
--- /trunk/plugins/Forms/popups/form.html (revision 191)
+++ /trunk/plugins/Forms/popups/form.html (revision 199)
@@ -15,4 +15,6 @@
   document.getElementById("f_action").value = param.f_action;
   document.getElementById("f_method").value = param.f_method;
+  document.getElementById("f_enctype").value = param.f_enctype;
+  document.getElementById("f_target").value = param.f_target;
  	document.getElementById("f_name").focus();
 };
@@ -31,5 +33,5 @@
   }
   // pass data back to the calling window
-  var fields = ["f_name", "f_action", "f_method"];
+  var fields = ["f_name", "f_action", "f_method", "f_enctype", "f_target"];
   var param = new Object();
   for (var i in fields) {
@@ -59,5 +61,5 @@
   <legend>Form handler script</legend>
   <div class="space"></div>
-  <div class="fr">Script URL:</div>
+  <div class="fr">Action URL:</div>
   <input name="action" id="f_action" type="text" size="30">
   <p />
@@ -69,4 +71,14 @@
   </select>
   <div class="space"></div>
+  <div class="fr">Encoding:</div>
+  <select name="enctype" id="f_enctype">
+    <option value=""></option>
+    <option value="application/x-www-form-urlencoded">HTML-Form to CGI (default)</option>
+    <option value="multipart/form-data">multipart Form Data (File-Upload)</option>
+  </select>
+  <p />
+  <div class="fr">Target Frame:</div>
+  <input name="target" id="f_target" type="text" size="30">
+  <p />  
   </fieldset>
 
