Do not set input type as numeric if field is an array

This commit is contained in:
K0n24d 2015-09-21 21:35:51 +02:00 committed by Jakub Vrana
parent 9e4d9fda65
commit 1d0607177d

View file

@ -917,7 +917,7 @@ function input($field, $value, $function) {
}
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
echo "<input"
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "")
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
. " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
. (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
. "$attrs>"