Merge pull request #592 from ComputerTinker/ComputerTinker-FixEmptyDropdownEntry

Pad Empty Dropdown Entry
This commit is contained in:
troosan 2017-12-19 21:53:59 +01:00 committed by GitHub
commit 8929917677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -160,6 +160,9 @@ class FormField extends Text
$xmlWriter->writeElementBlock('w:result', 'w:val', $value);
$xmlWriter->writeElementBlock('w:default', 'w:val', $default);
foreach ($entries as $entry) {
if ($entry == null || $entry == '') {
$entry = str_repeat(' ', self::FILLER_LENGTH);
}
$xmlWriter->writeElementBlock('w:listEntry', 'w:val', $entry);
}
$xmlWriter->endElement();