rabin 2 years ago
parent
commit
1e763588a5
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Lib/Input.php

+ 6 - 1
src/Lib/Input.php

@@ -1065,7 +1065,12 @@ class Input
             return '<div class="">' . self::text($param, false) . '</div>';
         } else {
             $auto = $input = '';
-            $value = (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : ''));
+            if (isset($param['const'])) {
+                $value = $param['const'];
+            } else {
+                $value = (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : ''));
+            }
+            
             if (isset($param['autocomplete']) && $param['update'] == 'text') {
                 if (empty($param['autocomplete'][1])) {
                     $param['autocomplete'][1] = 'value';