--- a/adminer/include/functions.inc.php
+++ b/adminer/include/functions.inc.php
@@ -903,6 +903,25 @@
 	return $adminer->processInput($field, $value, $function);
 }
 
+/** Compute fields() from $_POST edit data
+* @return array
+*/
+function fields_from_edit() {
+	$return = array();
+	foreach ((array) $_POST["field_keys"] as $key => $val) {
+		if ($val != "") {
+			$val = bracket_escape($val);
+			$_POST["function"][$val] = $_POST["field_funs"][$key];
+			$_POST["fields"][$val] = $_POST["field_vals"][$key];
+		}
+	}
+	foreach ((array) $_POST["fields"] as $key => $val) {
+		$name = bracket_escape($key, 1); // 1 - back
+		$return[$name] = array("field" => $name, "privileges" => array("insert" => 1, "update" => 1), "null" => 1);
+	}
+	return $return;
+}
+
 /** Print results of search in all tables
 * @uses $_GET["where"][0]
 * @uses $_POST["tables"]