This project is read-only.

Change Admin Edit form to use enctype="multipart/form-data" without using JavaScript

Topics: Writing modules
Aug 22, 2012 at 10:16 PM

Is there a way to change the way the content item edit form is rendered so that I can insert the attribute enctype="multipart/form-data" at render time, not using jQuery/JavaScript code that will be executed in the browser?

I'm trying to include the upload of an image into the edit form but want to support the scenario where JavaScript is turned off.

Aug 25, 2012 at 3:41 AM

One way I can think of is create a new theme, and have it be dependent on TheAdmin theme.

Then you can override the Contents/Views/Admin/Edit.cshtml view by copying that file to a /Views/Contents/Admin/Edit.cshtml of your custom admin theme.
In the overridden version, you can add the enctype attribute as required.