Forum

Thread tagged as: Question, Problem, Events

How do I remove «description» and «categories» from the Event template in admin?

Is it possible to remove «description» and «categories» from the Event template in admin? I like to hide this forms from admin. But I can´t find the right template.

Thank you!

Stig Tafto

Stig Tafto 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can't remove those - they're fixed fields.

Is it possible to reorder these fields?

Thanks.

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, they're fixed unfortunately.

Simon Clay

Simon Clay 127 points

Hi Stig,

We can however 'hide' those fields on the Events edit page. Here's how:

Find the file perch/addons/plugins/ui/_config.inc (or create it if it doesn't exist) and add this line to it:

<script type="text/javascript" src="/perch/addons/plugins/ui/my_js_file.js"></script>

Then create a file in the same folder called my_js_file.js (if it doesn't exist already) and add this to it:

if ($("h1").text().indexOf('Editing an Event') !== -1) {
  $("label:contains('Description')").closest("div").hide();
  $("div.field:contains('Categories')").hide();
}