I will use anything that means it can load quicker

Is this the most optimised way to use a ListboxField? Reason for asking is having a fair few of these on a page type is really making the page load slow in the CMS

  1. $FiltersOne = FilterOne::get();
  2. // $FiltersOne = $this->owner->FilterOne();
  3. foreach($FiltersOne as $Filter){
  4. $attributes = $FiltersOne->sort("Title")->map("ID", "Title")->toArray();
  5. }
  6. if (isset($attributes)) {
  7. $fields->addFieldToTab("Root.Search", ListboxField::create("FilterOne", $config->FilterOneTitle, $attributes));
  8. }

Ah brilliant I didnt realise you could do that, thank you @wmk

@wmk can you pass an argument into a grid field to sort ASC?

Can you order lumberjack pages in ASC order?

No I could never solve it, luckily the client wanted a Date and Time sesperate fields which seemed to work but yet DateTime didnt