Skip to content

Commit cbc55bc

Browse files
author
Till Brehm
committed
Merge branch '6624-form_field_default' into 'develop'
Use our default value instead of an empty string, fixes #6624 Closes #6624 See merge request ispconfig/ispconfig3!1834
2 parents aedefdd + bb99e95 commit cbc55bc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

interface/lib/classes/tform_base.inc.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ function getHTML($record, $tab, $action = 'NEW') {
478478
if(isset($record[$key])) {
479479
$val = $record[$key];
480480
} else {
481-
$val = '';
481+
$val = $field['default'];
482482
}
483483

484484
// If Datasource is set, get the data from there
@@ -621,11 +621,7 @@ function getHTML($record, $tab, $action = 'NEW') {
621621
break;
622622

623623
default:
624-
if(isset($record[$key])) {
625-
$new_record[$key] = $app->functions->htmlentities($record[$key]);
626-
} else {
627-
$new_record[$key] = '';
628-
}
624+
$new_record[$key] = $app->functions->htmlentities($val);
629625
}
630626
}
631627
}

0 commit comments

Comments
 (0)