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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

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


Go to End


2 Posts   1584 Views

Avatar
_Vince

Community Member, 165 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, 541 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