fix: javascript errors in SQL Form date inputs in IE

This commit is contained in:
Graham Knop 2007-07-24 22:32:05 +00:00
parent 9233864868
commit 86d9fc6860
2 changed files with 4 additions and 1 deletions

View file

@ -2442,7 +2442,9 @@ sub _getFormElement {
$fieldParameters->{$field->{widthParam}} = $field->{formFieldWidth} if ($field->{formFieldWidth});
$fieldParameters->{$field->{heightParam}} = $field->{formFieldHeight} if ($field->{formFieldHeight});
$fieldParameters->{maxlength} = $maxLength;
$fieldParameters->{extras} = 'onkeyup="if (this.value.length > '.$maxLength.') {this.value = this.value.substring(0,'.$maxLength.');}"';
if ($fieldType eq 'textarea') {
$fieldParameters->{extras} = 'onkeyup="if (this.value.length > '.$maxLength.') {this.value = this.value.substring(0,'.$maxLength.');}"';
}
$fieldParameters->{id} = 'sqlform'.$field->{fieldId};
# Show file if a file is uploaded