diff --git a/class.templater.php b/class.templater.php index 0c41d1a..16495ef 100644 --- a/class.templater.php +++ b/class.templater.php @@ -1092,10 +1092,11 @@ class TemplateInput extends TemplateStandaloneElement $this->parent = $parent; $type = "text"; - $value = ""; + $val = ""; $group = "general"; $name = null; $additional_list = array(); + $id = ""; $argument_list = implode(" ", $this->tokens); $argument_list = $this->ReplaceInlineVariables($argument_list, $data); @@ -1109,9 +1110,6 @@ class TemplateInput extends TemplateStandaloneElement case "name": $name = $argument[2]; break; - case "value": - $value = $argument[2]; - break; case "group": $group = $argument[2]; break; @@ -1122,7 +1120,10 @@ class TemplateInput extends TemplateStandaloneElement $type = $argument[2]; break; case "value": - $value = $argument[2]; + $val = $argument[2]; + break; + case "id": + $id = $argument[2]; break; default: $additional_list[$argument[1]] = $argument[2]; @@ -1137,9 +1138,14 @@ class TemplateInput extends TemplateStandaloneElement if(isset($_POST[$name])) { - $value = str_replace('"', '\"', htmlspecialchars($_POST[$name])); + $val = str_replace('"', '\"', htmlspecialchars($_POST[$name])); } - + + if(empty($id)) + { + $id = "form_{$group}_{$name}"; + } + $final_list = array(); foreach($additional_list as $key => $value) @@ -1149,7 +1155,7 @@ class TemplateInput extends TemplateStandaloneElement $additional = implode(" ", $final_list); - return ""; + return ""; } }