As described here:

Show 1 attachment(s)
Silverstripe Forum  
Adding SVG to the allowed files in SS4

This one comes up quite a lot on the Slack channel, so I thought it was worth a post here as well. The below is specific to SVG files, but the same techniques apply to other extensions. The first thing to note is that, contrary to what your instinct might think, an SVG isn’t an image file. In SilverStripe, images are bitmap-style files such as jpg, gif, png, etc. and when you use them, you get all kinds of extra manipulation classes. Because of this, SVG files needs to be stored in File ...

Hide attachment content

Hmmm, how can I add a file type to the allowed filetypes .htaccess in assets?


I have a form with a CheckboxSetField that I need to be ticked before submission, so I've added it to RequiredFields. But no matter what I do, it always seems to fail the validator. Any ideas what I'm doing wrong?

  1. $myForm = Form::create(
  2. $this->owner,
  3. 'MyForm',
  4. $fields = FieldList::create([
  5. ...
  6. CheckboxField::create('ConsentObtained', $consentObtainedLabel)
  7. ]),
  8. $actions = FieldList::create([...]),
  9. $validator = RequiredFields::create([
  10. ...
  11. 'ConsentObtained',
  12. ])
  13. );

($consentObtainedLabel is a string loaded from the CMS)


Strangely enough, error message shown it isn't 'ConsentObtained' is required. It's 'The value of my CMS string' is required


heh, if I pass $consentObtainedLabel into the RequiredFields constructor instead, it does pass. lol


Found it... was in my template override to ... the value was hardcoded to 0 😄


Hrm... no, still not it! It seems RequiredFields is not seeing data for the ConsentObtained field


For some reason, emails from the CMS always look in the application folder, maybe that's the problem?

Ryan Duncan

Hello, having a bit of an issue with the userforms module. I'm trying to use a custom email template and have added the code:

  1. SilverStripe\UserForms\Model\UserDefinedForm:
  2. email_template_directory: app/templates/custom_userforms_emails
into my config.yml file. The template shows up correctly in the email template drop down but when the email is sent it defaults back to the original template.

I'm getting the error:

  1. None of the following templates could be found: tes/custom_userforms_emails/Test in themes
and the directory I have the templates in is:
  1. app/templates/custom_userforms_emails
for some reason it is cut off in the error.

I've tried dev/build and flushing multiple times, also tried removing the thememanifest cache (was mentioned on a previous bug post on github) but nothing has worked for me.

Has anyone had anything similar? Cheers!


If I have an Image object, is there a way to get access to the Interventation library methods through it?


only I need to do some things based on the get param


so actually my bad, it can redirect to where it is going now