LiamC

Does anyone know what I have done wrong? 😕

LiamC
  1. $Make = $fields->dataFieldByName("MakeID");
  2. if ($Make) {
  3. $fields->addFieldToTab(
  4. 'Root.Main',
  5. DependentDropdownField::create(
  6. 'ModelID',
  7. 'Model',
  8. function ($val) {
  9. // Return empty list if no value set
  10. if (empty($val)) {
  11. return [];
  12. }
  13. // Else, get the grouped data of makes / models
  14. return $this->dataSource($val);
  15. }
  16. )->setDepends($Make)->setDescription("You must first select a 'Make'")
  17. );
  18. }
LiamC

I am using the dependent dropdown field and the silverstripe loading screen just loads and loads yet if I inspect the page and delete it I can see the dropdown works fine....

LiamC

My searchable fields pre fills out price with £0.00. How can I make it blank? when a customer wants to filter by brand its doing brand and price as £0.00

LiamC
  1. private static $searchable_fields = array(
  2. "Manufacturer.Title",
  3. );
doesnt work
LiamC
  1. private static $has_one = array(
  2. "Manufacturer" => Manufacturer::class,
  3. );
LiamC

Can you have searchable fields with a has_one relation?

jkersu

Just noticed for the 1st time today that the Security -> Groups admin tab in the CMS doesn't have Search filters or sorting the Group Title column on by default? I'd thought it be handy when you have a lot of groups. Anyone have an idea how I can add sorting by the Group Title as well as preferably add search filters? I have extended the updateEditForm hook and now have the Groups gridfield but not sure how to add the components I need? Usually I'd just set the searchable_fields + search context (if it was a custom DO). Update: I just replaced the existing gridfield with a custom default GridFieldConfig_RecordEditor

nightjarnz

Can be both, but default is to read php.ini.

👍 (1)
mike_henden

… so just to clarify @nightjarnz — this is a server setting rather than a Silvertripe setting?