Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

UploadField: any way to remove the "Saves into..." message?


Reply


2 Posts   308 Views

Avatar
_Vince

Community Member, 162 Posts

23 April 2014 at 11:15pm

Is there any way to remove the "(saves into /...)" message when creating an UploadField?

I could add a "display: none" in the CSS for the label class, but it seems wasteful.

The message doesn't do any actual harm, but I just KNOW it's going to confuse users. How can I get rid of it?

Avatar
Mo

Community Member, 510 Posts

6 August 2014 at 4:13am

Hi Vince,

You should just be able to use the setCanPreviewFolder method. As an example:

// Set image upload
$field = UploadField::create('Images', 'Upload Images');
$field->setCanPreviewFolder(false);

You can more info at the docs: http://doc.silverstripe.com/framework/en/reference/uploadfield