mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX submitted fieldfields in submission details in CMS
If you had a EditableFileField in your userform, the submission table in the CMS would just say "Array" rather than link to the file, making it fairly useless
This commit is contained in:
parent
692220451a
commit
0c39fad116
@ -25,10 +25,10 @@ class SubmittedFileField extends SubmittedFormField {
|
||||
$title = _t('SubmittedFileField.DOWNLOADFILE', 'Download File');
|
||||
|
||||
if($link) {
|
||||
return sprintf(
|
||||
return DBField::create_field('HTMLText', sprintf(
|
||||
'%s - <a href="%s" target="_blank">%s</a>',
|
||||
$name, $link, $title
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -18,7 +18,7 @@ class SubmittedFormField extends DataObject {
|
||||
);
|
||||
|
||||
private static $summary_fields = array(
|
||||
'Title',
|
||||
'Title' => 'Title',
|
||||
'FormattedValue' => 'Value'
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user