Added form attribute for inputs

This commit is contained in:
Jose Gonzalez 2020-04-13 15:41:00 +02:00
parent 189d85d659
commit d19a667ce9
1 changed files with 9 additions and 2 deletions

View File

@ -1336,6 +1336,7 @@ function html_print_input_text_extended(
'onkeyup',
'required',
'autocomplete',
'form',
];
$output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" ');
@ -1553,7 +1554,8 @@ function html_print_input_text(
$onChange='',
$autocomplete='',
$autofocus=false,
$onKeyDown=''
$onKeyDown='',
$formTo=''
) {
if ($maxlength == 0) {
$maxlength = 255;
@ -1590,6 +1592,10 @@ function html_print_input_text(
$attr['autofocus'] = $autofocus;
}
if ($formTo != '') {
$attr['form'] = $formTo;
}
return html_print_input_text_extended(
$name,
$value,
@ -3462,7 +3468,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['onChange']) === true) ? $data['onChange'] : ''),
((isset($data['autocomplete']) === true) ? $data['autocomplete'] : ''),
false,
((isset($data['onKeyDown']) === true) ? $data['onKeyDown'] : '')
((isset($data['onKeyDown']) === true) ? $data['onKeyDown'] : ''),
((isset($data['form']) === true) ? $data['form'] : '')
);
break;