mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #1075 from g4b0/8088-GroupedDropdownField-xhtml-strict-2
BUG:removed null FormField value. fixes #8088
This commit is contained in:
commit
06f05d0e7a
@ -125,7 +125,7 @@ class FormField extends RequestHandler {
|
||||
foreach($attributes as $k => $v) {
|
||||
// Note: as indicated by the $k == value item here; the decisions over what to include in the attributes
|
||||
// can sometimes get finicky
|
||||
if(!empty($v) || $v === '0' || $k == 'value') {
|
||||
if(!empty($v) || $v === '0' || ($k == 'value' && $v !== null) ) {
|
||||
$preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user